Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CollapsiblePanel

Status
Not open for further replies.

mytaurus2000

Technical User
Oct 4, 2006
138
US
Does anyone have any good resources regarding coding CollapsiblePanels in VB?
 
You can make your own in VS with a panel and a couple lines.

Need a form with the following:
1 panel
3 textboxes
2 button

Put the 3 text boxes in the panel, spaced vertically evenly
Set the Panels background color to something else, so you can see it resize.
Set the AutoSize property to GrowAndShrink

Put this code in the code page:
Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox3.Visible = Not TextBox3.Visible
        TextBox1.Visible = Not TextBox1.Visible
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox2.Visible = Not TextBox2.Visible
    End Sub

Voila!


-Sometimes the answer to your question is the hack that works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top