SelectTab PowerScript function
Description
Selects the specified tab, displaying its tab page in the
Tab control.
Controls
Tab controls
Syntax
|
1 |
<span>tabcontrolname</span>.<span>SelectTab</span> ( <span>tabidentifier</span> ) |
|
Argument |
Description |
|---|---|
|
tabcontrolname |
The name of the Tab control in which |
|
tabidentifier |
The tab you want to select. You can specify:
|
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs.
Usage
Equivalent syntax
You can select a tab by setting the SelectedTab property to
the tab’s index number:
|
1 |
tab_1.SelectedTab = 3 |
Examples
These three examples select the third tab in tab_1.
They could be in the script for a CommandButton on the window containing
the Tab control tab_1:
|
1 |
tab_1.<span>SelectTab</span>(3) |
|
1 |
tab_1.<span>SelectTab</span>(tab_1.uo_3) |
|
1 |
string ls_tabpage |
|
1 |
ls_tabpage = "uo_3" |
|
1 |
tab_1.<span>SelectTab</span>(ls_tabpage) |
This example opens an instance of the user object uo_fontsettings as
a tab page and selects it:
|
1 |
userobject uo_tabpage |
|
1 |
string ls_tabpage |
|
1 |
ls_tabpage = "uo_fontsettings" |
|
1 |
tab_1.OpenTab(uo_tabpage, ls_tabpage, 0) |
|
1 |
tab_1.<span>SelectTab</span>(uo_tabpage) |