Results 1 to 5 of 5

Thread: [RESOLVED] What are split containers used for?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    86

    Resolved [RESOLVED] What are split containers used for?

    Hi,

    I've just been looking at some sample code/project.

    The form in this project uses vertical split containers and Horizontal split containers.

    I can't understand why they are used. I mean, in one containers there is only a tree view. So why wouldn't the developer/designer simply put a treeview in one part of the form, and leave out the split container.

    Regards,

    Kareem

  2. #2
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: What are split containers used for?

    There are a thousand and one use for them.

    In this case, the TreeView is probably anchored to the left side and then the individual can resize it to see more content if they like. Then the other data is displayed in the right panel of the split container.

    This is evident in a Windows' explorer window.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

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

    Re: What are split containers used for?

    Have you ever used Windows Explorer? Notice how it has two panes: one on the left for the folder tree and one on the right for the file list. Have you ever dragged the bar between the two to adjust their relative sizes? That is what a SplitContainer does. Without it the TreeView would occupy a static amount of space. With the SplitContainer, the user gets to decide how much space each pane occupies.

    Visual Studio itself is a great example of the use of the SplitContainer. In VS you often have a code window open at the same time as the Toolbox, the Solution Explorer, the Properties window and possibly others too. It's the SplitContainer that lets you drag the bars between those docked windows and the main window to control how much of each you can see. Outlook is another example, as are so many other applications that display multiple panes in the one window.
    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
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: What are split containers used for?

    ever used File Explorer? Ever get so deep into the different folders that you have to scroll left/right to see things in the tree? That's why.... because not everyone';s screens are the same... sometimes the user needs to have the ability to make that tree view wider.

    SQL Server Management Studio is the same way.... after I click open the Server, database, progammability, functions, table function, the function, the parameters..... I'm burried pretty deep... if the developer only gave me a 2 inch window to see all that.... I'd nbever use SSMS.

    It's a usability/convenience thing.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    86

    Re: What are split containers used for?

    Hi,

    Yes, I see what you mean.

    I can now see that it can be very useful.

    Regards,
    Kareem.

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