BBjWindow::addTabCtrl
Description
Adds a tab control in the BBjWindow of the current context.
Syntax
Return Value |
Method |
---|---|
BBjTabCtrl | addTabCtrl() |
BBjTabCtrl | addTabCtrl(int ID) |
BBjTabCtrl | |
BBjTabCtrl |
addTabCtrl(int ID, number x, number y, number w, number h, string flags) |
BBjTabCtrl |
addTabCtrl(int ID, number x, number y, number w, number h, string flags, string styles) |
BBjTabCtrl |
addTabCtrl(int ID, number x, number y, number w, number h, string flags, string styles, string tabDesc) |
BBjTabCtrl |
addTabCtrl(int ID, number x, number y, number w, number h, string flags, string styles, string tabDesc, int imageList) |
BBjTabCtrl | addTabCtrl(int ID, string flags) |
BBjTabCtrl | addTabCtrl(int ID, string flags, string styles) |
BBjTabCtrl | addTabCtrl(int ID, string flags, string styles, string tabDesc) |
BBjTabCtrl | addTabCtrl(int ID, string flags, string styles, string tabDesc, int imageList) |
BBjTabCtrl | addTabCtrl(string flags) |
BBjTabCtrl | addTabCtrl(string flags, string styles) |
BBjTabCtrl | addTabCtrl(string flags, string styles, string tabDesc) |
BBjTabCtrl |
addTabCtrl(string flags, string styles, string tabDesc, int imageList) |
Parameters
Variable |
Description |
|||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ID |
Control ID number. It must be an integer between 1 and 32767 and be unique within a given top-level window. |
|||||||||||||||||||||||||||||
x |
Horizontal position of the upper-left corner of the tab control. |
|||||||||||||||||||||||||||||
y |
Vertical position of the upper-left corner of the tab control. |
|||||||||||||||||||||||||||||
w |
Width of the tab control. |
|||||||||||||||||||||||||||||
h |
Height of the tab control. |
|||||||||||||||||||||||||||||
flags |
Tab control flags, as follows:
|
|||||||||||||||||||||||||||||
styles |
Tab style flags, as follows:
|
|||||||||||||||||||||||||||||
tabDesc |
Tab descriptor. A tab descriptor must exist for each tab item on the tab control and must reference the index of the image to be displayed on the tab. The table below identifies the tab descriptor fields. The string is identical to the TABDES$ string defined in SENDMSG() TABCTRL Function 27: imgidx:i(2),id:I(2),text:c(1*=0) The imgidx field is a binary string that contains the index of the image list being used by the tab control. It has a relative offset of 1 and a length of 2. A value of -1, $FFFF$, indicates that the image is to be displayed on the tab. If no image list is specified during creation, this field is ignored. The id field is a binary string containing the ID of the child window or control to be displayed when the user selects the tab item. It has a relative offset of 3 and a length of 2. A value of -1, $FFFF$, indicates that no child window or control will automatically be displayed. The control or child window does not need to exist at the time of creation, but it must exist when user selects the tab, or a blank client area will be shown. The text field is a null-terminated string that defines the text to be displayed on the tab item. It has a relative offset of 5 and a variable length. |
|||||||||||||||||||||||||||||
imageList |
Imagelist ID. If the specified bitmap cannot be located, an !ERROR=12 is generated. |
Return Value
Returns the created BBjTabCtrl object.
Remarks
The tab control client area displays the contents of a control or child
window when a tab is selected.
The tabDesc
variable may not contain special characters. These are characters with
ASCII representations higher than 127, such as the � character. If special
characters are needed in the tab descriptions, then use the BBjTabCtrl.addTab(Title)
to set the title of specific tabs.
If the ID parameter is not specified, a control ID is assigned dynamically using getAvailableControlID().
If the x, y, width, and height parameters are not specified, they are all initialized to 0. This is typically for use with DWC windows that dynamically arrange their contents (window creation flag $00100000$).
Example
|
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.