
BBjControl
Description
The BBjControl object is the base object for all SysGui controls and it provides methods for manipulating these controls.
Creation
BBjAPI > BBjSysGui > BBjControl
The BBjControl object is obtained with the following BBjWindow object method:
Return Value |
Method |
---|---|
BBjControl |
getControl(int id) |
Methods of BBjControl
Return Value |
Method |
---|---|
boolean |
addStyle(string styleName) |
void |
clearCallback(int eventType) |
void |
|
void |
destroy() |
void |
focus() |
string |
getAttribute(string attribute) |
boolean | getBeepOnValidationFailure() |
boolean |
|
boolean |
|
Object |
getClientProperty(Object key) |
string |
getComputedStyle(string property) |
int |
|
int |
|
getFont() |
|
int |
|
int |
getID() |
string |
|
string |
getName() |
boolean |
|
boolean |
|
int |
|
int |
|
string |
|
string |
getStyle(string property) |
BBjVector |
|
string |
getText() |
string |
|
Object |
|
int |
getWidth() |
int |
getX() |
int |
getY() |
boolean |
|
boolean |
|
boolean |
|
boolean |
isOpaque() |
boolean |
|
void |
putClientProperty(Object key, Object value) |
void |
|
boolean |
removeStyle(string styleName) |
void |
setAttribute(string attribute,string value) |
void |
setBackColor(BBjColor color!) |
void | setBeepOnValidationFailure(boolean shouldBeep) |
void |
setCallback(int eventType, CustomObject customObj, string methodName) |
void |
setCallback(int eventType, string subRoutineName) |
void |
setCausesControlValidation(boolean valid) |
void |
setClientEdge(boolean client) |
void |
setCursor(int cursor) |
void |
setEnabled(boolean enabled) |
void |
setFont(BBjFont font!) |
void |
setForeColor(BBjColor color!) |
void |
setGrouped(boolean grouped) |
void |
setLocation(int x, int y) |
void |
setLongCue(string cue) |
void |
setName(string name) |
void |
setNoEdge(boolean noEdge) |
void |
setOpaque(boolean opaque) |
void |
setPopupMenu(BBjPopupMenu popupMenu!) |
void |
setRaisedEdge(boolean raised) |
void |
setShortCue(string cue) |
void |
setSize(int width, int height) |
void |
setStyle(string property, string value) |
void |
setText(string text) |
void |
setToolTipText(string text) |
void |
setUserData(Object userData) |
void |
setVisible(boolean visible) |
void |
showToolTipText(int x, int y) |
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.
All BUI windows and controls inherit the BBjControl style. The basic implementation of this style sets the following CSS properties:
.BBjControl |
The box-sizing: border-box setting says that a control defined for a given size will take up precisely that size on the screen, with any padding and borders going inside that defined size. The font: inherit setting initializes the font of each control to the font of its parent. If a custom CSS file defines additional styles for the .BBjControl selector, they'll be applied to every control and every window -- so use this sparingly.
Remarks
All SysGui controls (BBjWindow, BBjGrid, BBjTree, etc.) are also BBjControl objects. All BBjControl object methods, except where otherwise noted, can be used on all controls.
Constants
Value | Control Constant |
---|---|
-1 |
UNKNOWN_CONTROL |
0 |
WINDOW |
1 |
MAIN_WINDOW |
2 |
CHILD_WINDOW |
3 |
MENU |
4 |
SPECIAL_CONTROL |
5 |
NATIVE_CONTROL |
11 |
PUSHBUTTON_CONTROL |
12 |
RADIOBUTTON_CONTROL |
13 |
CHECKBOX_CONTROL |
14 |
HSCROLL_CONTROL |
15 |
VSCROLL_CONTROL |
16 |
EDIT_CONTROL |
17 |
TEXT_CONTROL |
18 |
LISTBOX_CONTROL |
19 |
LISTBUTTON_CONTROL |
20 |
LISTEDIT_CONTROL |
21 |
GROUPBOX_CONTROL |
22 |
CEDIT_CONTROL |
24 |
LINECHART_CONTROL |
25 |
BARCHART_CONTROL |
26 |
PIECHART_CONTROL |
27 |
HTMLVIEW_CONTROL |
28 |
MENUBUTTON_CONTROL |
29 |
PRINTPREVIEW_CONTROL |
30 |
GENERICCHART_CONTROL |
31 |
WRAPPED_JCOMPONENT_CONTROL |
100 |
MENUITEM_CONTROL |
101 |
CHECKABLE_MENUITEM_CONTROL |
102 |
STATUSBAR_CONTROL |
103 |
TOOLBUTTON_CONTROL |
104 |
INPUTE_CONTROL |
105 |
INPUTN_CONTROL |
106 |
TAB_CONTROL |
107 |
GRID_CONTROL |
108 |
IMAGE_CONTROL |
109 |
TREE_CONTROL |
110 |
DATAAWARE_GRID_CONTROL |
112 |
PROGRESS_CONTROL |
113 |
NAVIGATOR_CONTROL |
114 |
INPUTD_CONTROL |
115 |
NAMESPACE_CONTROL |
116 |
GRID_HEADER_CONTROL |
117 |
HSLIDER_CONTROL |
118 |
VSLIDER_CONTROL |
119 |
FILECHOOSER_CONTROL |
120 |
COLORCHOOSER_CONTROL |
121 |
FONTCHOOSER_CONTROL |
122 |
DATABOUND_GRID_CONTROL |
123 |
INPUTD_SPINNER_CONTROL |
124 |
INPUTE_SPINNER_CONTROL |
125 |
INPUTN_SPINNER_CONTROL |
126 |
EDIT_SPINNER_CONTROL |
127 |
HTMLEDIT_CONTROL |
Alignment Constants: |
|
|
ALIGN_LEFT |
|
ALIGN_RIGHT |
|
ALIGN_CENTER |
Orientation Constants: |
|
|
HORIZONTAL |
|
VERTICAL |
Menu Cut/Copy/Paste Constants: |
|
32027 |
CUT |
32028 |
COPY |
32029 |
PASTE |
Color Constants: |
|
0 |
BLACK |
1 |
BLUE |
2 |
RED |
3 |
MAGENTA |
4 |
GREEN |
5 |
CYAN |
6 |
YELLOW |
7 |
WHITE |
8 |
DKGRAY |
9 |
GRAY |
10 |
LTGRAY |
Example
REM Get a control from a window |
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.