Using button to replace tabpage' tab.

  • Thread starter Thread starter sam
  • Start date Start date
S

sam

I want to deploy several buttons in my GUI.
When I click one of them,the right panel will change.
(I plan to place several combobox,label and dataGrid
in the right panel)

I want to have the same effect as tabpage,but I dont
want the tabpage mode.

Can you teache me how to achieve my goal?
I really dont know how to start this.
Your help on this will be greatly appreciated.

Can PictureBox container achieve this? If it do,
I still dont know how to make the GUI to own
the tabpage effect.
 
Hi Sam,

Place a panel on your form,
On that you place the controls
Outside it you place a button (button1)
Then I think you can use this sample code

\\\\\
Private Sub Button1_Click(ByVal sender _
As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
Dim ctr As Control
If Me.Button2.Visible Then
For Each ctr In Me.Panel1.Controls
ctr.Visible = False
Next
Else
For Each ctr In Me.Panel1.Controls
ctr.Visible = True
Next
End If
End Sub
/////////
I hope this helps a little bit
Cor
 
Back
Top