Hey i want to open Tabpage 2 when i click button 1 on Tabpage 2, how to do it? :)

Recommended Answers

All 8 Replies

Can you please provide more information? Your question isn't quite clear...

when i click on Button i want to get on Tabbed page 2 :/

OK... I'm going to have to make some assumptions here:

You have 2 tabs, we'll say, Tab1 and Tab2. Tab1 has a button on it. You want to click this button and have it move to Tab2?

If that's it, you just have the method that handles the Button's Click() event set the tab control's SelectedIndex to the index number (probably 1) of Tab2.

http://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol.selectedindex.aspx

I don't mean to sound ugly, but this is what I mean when I asked describe your issue in more detail. What elements are you working with? What is it doing now? What is it supposed to be doing? If this isn't what you wanted, then I just wasted my time answering the wrong question.

im working on some Lua scripter so there are STEP 1 STEP 2 STEP 3 etc STEP 1 is Tabbedpage 1 so when i click on button(Next Step) i want to get on tabbedpage 2, my english is terrible so i cant explain you very well :/

In VB.NET 2008 it is:
TabControl1.SelectTab(x)
x = 1, 2, 3 etc

Example:
TabControl1.SelectTab(2) - Page 2

For vB.NET 2010 is:

TabControl1.SelectTab(TabPage2)

Tnx :)

Just for references, you can also select by Index.

TabControl1.SelectedIndex = 1 '// select TabPage2.

Tnx codeorder :)) Btw why i cant find you on msn??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.