Results 1 to 9 of 9

Thread: how to have the treeview the whole height of the page

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2024
    Posts
    72

    how to have the treeview the whole height of the page

    Hello,

    I attaced the picture. In this picture there is a horizontal line below of the tree view. I want the tree view have the whole place. how to do that?
    now fill for tree view is none and for toolstrip is top.

    thank youName:  dockscreenshot.png
Views: 287
Size:  11.3 KB

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,070

    Re: how to have the treeview the whole height of the page

    Set the Height at design time and set Dock… I don’t remember the possible values at the moment, so try it, and see how it looks

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,097

    Re: how to have the treeview the whole height of the page

    There's no need to set the Height if you set Dock. Dock the ToolStrip to Top first, then Dock the TreeView to Left. That should give you the effect you want.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2024
    Posts
    72

    Re: how to have the treeview the whole height of the page

    Hello,

    I set the toolstrip to top and then treeview to left but the treeview will be disappeared when i do it.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,097

    Re: how to have the treeview the whole height of the page

    Sounds like you did something wrong. Create a new form, add a ToolStrip, then add a TreeView. The ToolStrip will be docked to the Top by default. Set the Dock for the TreeView to Left. Does it work as expected? That's what I just did and it worked as you'd expect. If it works, you need to determine what's different about your existing form. If it doesn't work, we'll have to dig a little deeper.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jan 2024
    Posts
    72

    Re: how to have the treeview the whole height of the page

    Hello,

    you know it doesn't work for me and i can't make a new form. I have to change the current form.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jan 2024
    Posts
    72

    Re: how to have the treeview the whole height of the page

    When i dock the treeview to left the toolstrip would be disappeared

  8. #8
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,070

    Re: how to have the treeview the whole height of the page

    Quote Originally Posted by mred View Post
    Hello,

    you know it doesn't work for me and i can't make a new form. I have to change the current form.
    He meant you should create a new application for testing purposes only. In a new application you can isolate the problem areas…

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,097

    Re: how to have the treeview the whole height of the page

    Quote Originally Posted by mred View Post
    you know it doesn't work for me
    Yes I do but it should if you did it right, so either you did something wrong or something is broken in your project or on your system. We can't work out which or what if all you do is keep telling it does work.
    Quote Originally Posted by mred View Post
    i can't make a new form.
    Of course you can. It's for diagnostic/testing purposes so can simply be discarded when that's done. Isolating problem functionality like that is not even something we should need to suggest. It should be something you do as a matter of course before even posting here. If the cause of the issue is something other than the ToolStrip or the TreeView and you haven't even mentioned it to us then this has all been a waste of your time and ours.
    Quote Originally Posted by mred View Post
    I have to change the current form.
    The two are not mutually exclusive.
    Quote Originally Posted by mred View Post
    When i dock the treeview to left the toolstrip would be disappeared
    That's not normal so, again, we need more specific information.
    Quote Originally Posted by .paul. View Post
    He meant you should create a new application for testing purposes only. In a new application you can isolate the problem areas…
    Not even necessarily a new application. Just add a new form to the same application and delete it once the testing is done. If you're using source control, which you should, then you can simply discard your changes and everything goes back to how it was on the last pull. If you do appropriate testing and still can't work out the issue then you should be providing us with a set of steps that we can follow to reproduce the issue. We'll be doing that with a new form so you should be testing that way too. If it works on a new form but not on the existing one then it's obviously something else about the existing form that's the problem, so you can change the new form to match the existing one step by step until it breaks, at which point you will have identified the cause.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width