Change tabs at run-time

J

Jim

I have a tabControl with 4 tabPages. In tab1 when you Double-click on a row
in a dataGrid I want to change tabs and have tab3 showing. I know how to
call the event, I just can't figure out how to switch the tabPage that is
showing during run-time. How do I do this in c#?

thanks
 
H

Herfried K. Wagner [MVP]

Jim said:
I have a tabControl with 4 tabPages. In tab1 when you Double-click on a row
in a dataGrid I want to change tabs and have tab3 showing. I know how to
call the event, I just can't figure out how to switch the tabPage that is
showing during run-time. How do I do this in c#?

Set the TabControl's 'SelectedTab' property to the tab you want to be selected.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Java-Server für J2EE-Applikationen verwundbar
<http://www.heise.de/newsticker/data/dab-07.10.03-000/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top