I have three tab pages in a a tab control. When I click a button, how do I get the second tab page to come to the front? I've tried bringtofront(), but it doesn't seem to do much.
Printable View
I have three tab pages in a a tab control. When I click a button, how do I get the second tab page to come to the front? I've tried bringtofront(), but it doesn't seem to do much.
tabcontrol1.selectedindex = {the tab you want}
to step through the tabs in order, you can create a variable and increment it eith every click event and the {tab you want} will be the variable.
like this:
VB Code:
'in Declarations public intIndex as integer = 0 'in the button_click TabControl1.SelectedIndex = intIndex intIndex += 1 If intIndex > 3 Then intIndex = 0 End If
Worked Awesome!!!
.selectedindex was what I was looking for!
Congrats on your daughter! 1-2 is such a fun age. My daughter just turned 2 and we had another daughter 3 weeks ago.
congrats to you too!!
here's a trick a used to learn some of the things I've learned:
I use the object browser and the msdn with vs.net. the help files tell you where the objects are in the namespace puzzle and the browser lists all the members.
This forum has helped a TON but the browser has proved to be an invaluable tool.
:)