BBjListBox
Description
The BBjListBox object provides methods for manipulating a GUI listbox control.
Implemented Interfaces
DragSource, DropTarget, Editable, Focusable, MouseWheelEnabled, RecordSetBindable,RecordSetFillable,Scrollable, SimpleRecordSetBindable,TabTraversable, TextAlignable,Validateable
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjListBox
A BBjListBox object is created through the following BBjWindow methods:
|
Return Value |
Method |
|---|---|
|
BBjListBox |
addListBox(int ID, number x, number y, number width, number height, string initialContents) |
|
BBjListBox |
addListBox(int ID, number x, number y, number width, number height, string initialContents, string flags) |
|
BBjListBox |
addListBox(int ID, string initialContents) |
|
BBjListBox |
addListBox(int ID, string initialContents, string flags) |
|
BBjListBox |
addListBox(string initialContents) |
|
BBjListBox |
addListBox(string initialContents, string flags) |
Methods of BBjListBox
|
Return Value |
Method |
|---|---|
|
void |
addItem(string item) |
|
void |
|
|
void |
deselectIndex(int index) |
| BBjColor | getBackColorAt(int index) |
| BBjColor | getForeColorAt(int index) |
|
string |
getItemAt(int index) |
|
int |
|
|
boolean |
|
|
int |
|
| BBjVector | getSelectedItems() |
|
void |
insertItemAt(int index, string item) |
|
void |
insertItems(int index, BBjVector itemVector!) |
|
void |
insertItems(int index, string items$) |
|
boolean |
|
|
void |
|
|
void |
removeItemAt(int index) |
|
void |
selectIndex(int index) |
| void | setBackColorAt(int index, BBjColor color) |
|
void |
setEditable(boolean edit) |
| void | setForeColorAt(int index, BBjColor color) |
|
void |
setImageAt(int index, BBjImage image!) |
|
void |
setMultipleSelection(int multi) |
|
void |
setSelectedIndices(BBjVector itemVector!) |
|
void |
setTextAt(int index, string text) |
Methods of BBjListBox implemented for DragSource
| Return Value | Method |
|---|---|
| int | getDragActions() |
| string | getDragType() |
| void | setDragActions(int actions) |
| void | setDragType(string type) |
Methods of BBjListBox implemented for DropTarget
| Return Value | Method |
|---|---|
| int | getDropActions() |
| void | setDropActions(int actions) |
| BBjVector | getDropTypes() |
| void | setDropTypes(BBjVector types) |
Methods of BBjListBox implemented for Editable
| Return Value | Method |
|---|---|
| boolean | isEditable() |
| void | setEditable(boolean edit) |
Methods of BBjListBox implemented for Focusable
| Return Value | Method |
|---|---|
| boolean | isFocusable() |
| void | setFocusable(boolean focus) |
Methods of BBjListBox implemented for MouseWheelEnabled
| Return Value | Method |
|---|---|
| int | getScrollWheelBehavior() |
| void | setScrollWheelBehavior(int trav) |
Methods of BBjListBox implemented for RecordSetBindable
| Return Value | Method |
|---|---|
| void | bindRecordSet(BBjRecordSet recordset!, string fieldname) |
| string | getBoundFieldName() |
Methods of BBjListBox implemented for RecordSetFillable
| Return Value | Method |
|---|---|
| void | fillFromRecordSet(BBjRecordSet recordset, string fieldname) |
Methods of BBjListBox implemented for Scrollable
| Return Value | Method |
|---|---|
| int | getHorizontalScrollBarHeight() |
| int | getHorizontalScrollBarPosition() |
| int | getHorizontalScrollBarWidth() |
| int | getVerticalScrollBarHeight() |
| int | getVerticalScrollBarPosition() |
| int | getVerticalScrollBarWidth() |
| boolean | isHorizontalScrollBarVisible() |
| boolean | isVerticalScrollBarVisible() |
| void | setHorizontalScrollBarPosition(int position) |
| void | setVerticalScrollBarPosition(int position) |
Methods of BBjListBox implemented for SimpleRecordSetBindable
| Return Value | Method |
|---|---|
| BBjRecordSet | getBoundRecordSet() |
| void | unbindRecordSet() |
Methods of BBjListBox implemented for TabTraversable
| Return Value | Method |
|---|---|
| boolean | isTabTraversable() |
| void | setTabTraversable(boolean trav) |
Methods of BBjListBox implemented for TextAlignable
| Return Value | Method |
|---|---|
| int | getAlignment() |
| void | setAlignment(int align) |
Methods of BBjListBox implemented for Validateable
| Return Value | Method |
|---|---|
| void | accept(boolean valid) |
| string | getValidationText() |
Methods of BBjListBox inherited from BBjControl
Events
|
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
|
ON_CONTROL_SCROLL |
p |
||
|
ON_CONTROL_VALIDATION |
v |
||
|
ON_DROP_TARGET_DROP |
D |
||
|
ON_GAINED_FOCUS |
f |
||
|
ON_LIST_CLICK |
l (lower case L) |
||
|
ON_LIST_DOUBLE_CLICK |
l (lower case L) |
||
|
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 BBjListBox defines the following style names:
.BBjListBox (the top level control)
.BBjListBox-item (an individual item within the list)
.BBjListBox-item.bbj-selected (a selected item)
.BBjListBox.bbj-disabled (the control is disabled)
.BBjListBox.bbj-focused (the control is focused)
.BBjListBox.bbj-readonly (the control is read only)
This section uses the list sample from the BBj BUI Showcase (code, demo).
With the default styles, the BBjListBox looks like this:
With the styles shown below, it looks like this:
|
Remarks
None.
Constants inherited from BBjControl
Example
|
See Also
LISTBOX Mnemonic - Create a List Box Control
CALLBACK Verb - Register BBj Subroutine
DWC Component: dwc-listbox
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.