Creates a tab user control on the user window specified by parentWindowID
. A tab is a way to organize user controls.
To have a tab manage controls, use the createForm command to create a form for every tab. Then control all the associated forms' visibility based on the active tab (using getTabSelItem), and the controls for that tab will follow.
User Window
createTab parentWindowID [-hidden] [-pos integer array] [-form integer] |
Name | Type | Required | Comments |
---|---|---|---|
parentWindowID | int | yes | ID of user window to place the control on. |
Name | Flag arguments | Argument type | Exclusive to | Comments |
---|---|---|---|---|
hidden | 0 | — | — | The tab is hidden until changed by a user event. |
pos | 1 | integer array | — | A four-element int array representing a rectangle, which specifies the initial size/position of the form relative to the top left corner of the user window. The element order is Left, Top, Right, and Bottom. Default is a form 200 units high by 200 units wide. |
form | 1 | integer | — | Control ID of the form user control which will dynamically position this form. |
integer
// Create a Tab control and add two tabs int $windowId; int $tabControl; int $firstTab; int $secondTab; // First create a User Window to place the Control on $windowId = `createWindow "MyWindow"`; //create a tab control $tabControl = `createTab $windowId`; //add tabs $firstTab = `addTab $tabControl "First"`; $secondTab = `addTab $tabControl "Second"`; |