Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activate tabpage of TabControl

I am using TabControl in #.NET application. By default first tab page of TabControl is showing in form loading. I want to activate/show other tab pages in form loading. Programmatically, how can I show other tab page?

like image 452
Vyasdev Meledath Avatar asked Oct 13 '10 06:10

Vyasdev Meledath


People also ask

How to select TabPage in TabControl in c#?

You can use the method SelectTab . Show activity on this post. There are two properties in a TabControl control that manages which tab page is selected. SelectedIndex which offer the possibility to select it by index (an integer starting from 0 to the number of tabs you have minus one).

What is Tab Control in VB net?

The Windows Forms TabControl displays multiple tabs, like dividers in a notebook or labels in a set of folders in a filing cabinet. The tabs can contain pictures and other controls. Use the TabControl to create property pages.


1 Answers

tabControl1.SelectedTab = MyTab; 

or

tabControl1.SelectedTab = tabControl1.TabPages["tabName"]; 

Where tabName is the Name of the tab you want to activate (tabName is NOT the text display).

like image 129
testalino Avatar answered Oct 12 '22 23:10

testalino