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?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
For Windows Smart device (compact frame work ) (MC75-Motorola devices)
Use
SelectTab
like this:Use
SelectedTab
like this:You can use the method
SelectTab
.There are 3 versions:
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).
SelectedTab which offer the possibility to selected the tab object itself to select.
Setting either of these property will change the currently displayed tab.
Alternatively you can also use the Select method. It comes in three flavour, one where you pass the index of the tab, another the TabPage object itself and the last one a string representing the tab's name.