SplitContainer Control Question?

Troy

Well-known member
Joined
Feb 7, 2005
Messages
153
Programming Experience
10+
A question for anyone using the Visual Basic .Net 2005 Beta.

Is there a way to programmatically turn off panel1 and the splitbar to only display the contents of Panel2 then later re-enable them?

I'm setting up an add customer sub and have Panel one with a treeview control, and panel2 with a panel populated with several textbox controls for the info.

I want to make it appear that the Treeview and splitbar go away when you enter an add mode so only they see the entry fields like one sheet.

I can make the treeview invis or disable it but either leaves the amount of space open on the screen where the treeview is.
 
To turn off the splitBar and panel1, hide the splitContainer and parent the panel (from panel2, the one populated with the textboxs) to the form.
To show it again, add the panel (from panel2) back as a child of the splitContainer and make the container visible again.
If you add a new form and select the 'Explorer Form' template, there will be a function named ToggleTaskPaneVisible that contains the code you're after.
 
Thanks a heap worked like a champ!
 
Back
Top