BBjRadioButton
Description
The BBjRadioButton object provides methods for manipulating a GUI radio button control.
Implemented Interfaces
Editable, Focusable, TabTraversable, TextAlignable, Validateable
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjRadioButton
A BBjRadioButton object is created through the following BBjWindow methods:
|
Return Value |
Method |
|---|---|
|
BBjRadioButton |
addRadioButton(int ID, number x, number y, number w, number h, string title) addRadioButton(int ID, number x,number y, number w, number h, string title, string flags) addRadioButton(int ID, String title) addRadioButton(int ID, String title, String flags) addRadioButton(String title) addRadioButton(String title, String flags) |
Creation Flags
| Flag | Description |
|---|---|
| $0001$ |
Sets the control to be initially disabled. |
| $0002$ |
Places title text to the left of the control. |
| $0004$ |
Sets the control to be initially checked. |
| $0010$ |
Sets the control to be initially invisible. |
| $0020$ |
Designates the control to be part of a keyboard navigation group. |
| $0800$ |
Draws a recessed client edge around the control. |
| $1000$ |
Draws a raised edge around the control. |
Methods of BBjRadioButton
|
Return Value |
Method |
|---|---|
|
int |
|
|
boolean |
|
|
boolean |
|
|
void |
setEditable(boolean editable) |
|
void |
setHorizontalTextPosition(int position) |
|
void |
setSelected(boolean selected) |
Methods of BBjRadioButton implemented for Editable
| Return Value | Method |
|---|---|
|
boolean |
|
|
void |
setEditable(boolean edit) |
Methods of BBjRadioButton implemented for Focusable
| Return Value | Method |
|---|---|
|
boolean |
|
|
void |
setFocusable(boolean focus) |
Methods of BBjRadioButton implemented for TabTraversable
| Return Value | Method |
|---|---|
|
boolean |
|
|
void |
setTabTraversable(boolean trav) |
Methods of BBjRadioButton implemented for TextAlignable
| Return Value | Method |
|---|---|
|
int |
|
|
void |
setAlignment(int align) |
Methods of BBjRadioButton implemented for Validateable
| Return Value | Method |
|---|---|
|
void |
accept(boolean valid) |
|
string |
Methods of BBjRadioButton inherited from BBjControl
Events
|
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
|---|---|---|---|
| ON_CHECK_CHANGE | BBjCheckChangeEvent | Check/Uncheck Event | c |
|
ON_CHECK_OFF |
c |
||
|
ON_CHECK_ON |
c |
||
|
ON_CONTROL_VALIDATION |
v |
||
|
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 |
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.
The BBjRadioButton is implemented as an <input
type="radio"> element with an associated label. It
defines the following style names:
.BBjRadioButton
.BBjRadioButton.bbj-checked
.BBjRadioButton.bbj-disabled
.BBjRadioButton.bbj-focused
.BBjRadioButton.bbj-readonly
HTML checkbox and radiobutton elements are notoriously difficult to style.
Remarks
By default, radiobuttons are not automatically
selected when they gain focus programmatically or by user keyboard operation
(TAB/SHIFT+TAB or LEFT, RIGHT, UP, DOWN arrows within a keyboard
navigation group). In BBj 16.00 and higher, setting the RADIOBUTTON_SELECT !COMPAT
setting to TRUE causes radiobuttons to be selected when they gain focus
for any reason.
Constants inherited from BBjControl
Example
|
See Also
RADIOBUTTON Mnemonic - Create a Radio Button Control
CALLBACK Verb - Register BBj Subroutine
DWC Component: dwc-radio
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.