BBjTabCtrl
Description
The BBjTabCtrl object provides methods for manipulating a GUI tab control.
Implemented Interfaces
DropTarget, Focusable, TabTraversable
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjTabCtrl
A BBjTabCtrl object is created through the following BBjWindow methods:
Return Value |
Method |
---|---|
BBjTabCtrl |
addTabCtrl() |
BBjTabCtrl |
addTabCtrl(int ID) |
BBjTabCtrl |
addTabCtrl(int ID, number x, number y, number w, number h) |
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) |
Methods of BBjTabCtrl
Return Value |
Method |
---|---|
void |
addTab(string title, BBjControl control!) |
void |
addTab(string title, int controlID) |
void |
addTab(string title, int imgIndex, BBjControl control!) |
void |
addTab(string title, int imgIndex, int controlID) |
void |
clearImageSizeAt(int index) |
getBackColorAt(int index) |
|
getControlAt(int index) |
|
int |
getControlIDAt(int index) |
getForeColorAt(int index) |
|
int |
getImageHeightAt(int index) |
int |
getImageIndexAt(int index) |
int |
|
string |
|
int |
getImageWidthAt(int index) |
int |
|
int |
|
int |
|
string |
getTitleAt(int index) |
string |
getToolTipTextAt(int index) |
void |
insertTab(int index, string title, BBjControl control!) |
void |
insertTab(int index, string title, int controlID) |
void |
insertTab(int index, string title, int imgIndex, BBjControl control!) |
void |
insertTab(int index, string title, int imgIndex, int controlID) |
boolean |
|
boolean |
isCloseableAt(int index) |
boolean |
isEnabledAt(int index) |
boolean |
|
void |
removeTab(int index) |
void |
setBackColorAt(int index, BBjColor color) |
void |
setCloseable(boolean closeable) |
void |
setCloseableAt(int index, boolean closeable) |
void |
setControlAt(int index, BBjControl control!) |
void |
setControlIDAt(int index, int controlID) |
void |
setEnabledAt(int index, boolean enabled) |
void |
setForeColorAt(int index, BBjColor color) |
void |
setImageAt(int index, BBjImageimage) |
void |
setImageIndexAt(int index, int imgIndex) |
void |
setImageListID(int ID) |
void |
setImageListPath(string pathFile) |
void |
setImageSizeAt(int index, number width, int height) |
void |
setMultiLine(boolean multi) |
void |
setNumTabs(int num) |
void |
setSelectedIndex(int index) |
void |
setTabHeight(int height) |
void |
setTabPlacement(int place) |
void |
setTitleAt(int index, string title) |
void |
setToolTipTextAt(int index, string toolTipText) |
Methods of BBjTabCtrl implemented for DropTarget
Return Value | Method |
---|---|
int | getDropActions() |
void | setDropActions(int actions) |
BBjVector | getDropTypes() |
void | setDropTypes(BBjVector types) |
Methods of BBjTabCtrl implemented for Focusable
Return Value | Method |
---|---|
boolean | isFocusable() |
void | setFocusable(boolean focus) |
Methods of BBjTabCtrl implemented for TabTraversable
Return Value | Method |
---|---|
boolean | isTabTraversable() |
void | setTabTraversable(boolean trav) |
Methods of BBjTabCtrl from BBjControl
Events
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
---|---|---|---|
ON_DROP_TARGET_DROP |
D |
||
ON_GAINED_FOCUS |
f |
||
ON_LOST_FOCUS |
f |
||
ON_MOUSE_ENTER |
E |
||
ON_MOUSE_EXIT |
E |
||
ON_POPUP_REQUEST |
r |
||
ON_RIGHT_MOUSE_DOWN |
R |
||
ON_TAB_CLOSE |
N (notify code 4) |
||
ON_TAB_POPUP |
N (Notify code 5) |
||
ON_TAB_DESELECT |
N (Notify code 3) |
||
ON_TAB_KEYPRESS |
N (Notify code 1) |
||
ON_TAB_SELECT |
N (Notify code 2) |
CSS
The visual appearance of BUI controls is defined using CSS (cascading style sheets) rules. Easily change the default colors, border, and other settings by customizing these rules, all without changing any application code. See CSS API for a high-level overview of BUI CSS.
To see the effect of some simple CSS rules, use the following BBjTabCtrl sample:
|
With the default CSS, that BBjTabCtrl looks like this:
The BBjTabCtrl defines the following CSS style names:
.BBjTabCtrl (the top level control)
.BBjTabCtrl.bbj-disabled (the tab control is disabled)
.BBjTabCtrl.bbj-focused (the tab control is focused)
.BBjTabCtrl-tabs (the tab bar running across the top)
.BBjTabCtrl-tab (an individual tab)
.BBjTabCtrl-tab-close (an individual tab)
.BBjTabCtrl-tab-selected (the close button on a tab)
.BBjTabCtrl-tab.bbj-disabled (a disabled tab)
.BBjTabCtrl-contentContainer (the body area of the tab that contains the currently selected tab child window)
.BBjTabCtrl-content (the window added to the tab)
The following test CSS gives the tabs a shiny purple-blue appearance shown below:
|
Remarks
In BBj 17.00 and higher, setting the PRESERVE_TABCTRL_SIZE !COMPAT setting to TRUE preserves the original size of controls added to a BBjTabCtrl, the original behavior of BBj. By default, controls are now resized to take the full available width and height within the BBjTabCtrl client area.
Constants
TOP |
BOTTOM |
RIGHT |
LEFT |
Constants inherited from BBjControl
Example
|
See Also
TABCTRL Mnemonic - Create a Tab Control
CALLBACK Verb - Register BBj Subroutine
DWC Component: dwc-tabbed-pane
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.