BBjListEdit
Description
The BBjListEdit object provides methods for manipulating a GUI list edit control.
Implemented Interfaces
DragSource, DropTarget, Editable, Focusable, MouseWheelEnabled, RecordSetBindable,RecordSetFillable,SimpleRecordSetBindable,TabTraversable, TextAlignable,TextControl,Validateable
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjListEdit
A BBjListEdit object is created through the following BBjWindow methods:
Return Value |
Method |
---|---|
BBjListEdit |
addListEdit(int ID, number x, number y, number w, number h, string initialContents) |
BBjListEdit |
addListEdit(int ID, number x, number y, number w, number h, string initialContents, string flags) |
BBjListEdit |
addListEdit(int ID, string initialContents) |
BBjListEdit |
addListEdit(int ID, string initialContents, String flags) |
BBjListEdit |
addListEdit(string initialContents) |
BBjListEdit |
addListEdit(string initialContents, String flags) |
Methods of BBjListEdit
Return Value |
Method |
---|---|
void |
addItem(string item) |
void |
|
void |
deselect() |
string |
|
int |
|
string |
getItemAt(int index) |
int |
|
void |
|
int |
|
void |
insertItemAt(int index, string item) |
void |
insertItems(int index, BBjVector itemVector!) |
void |
insertItems(int index, string items$) |
boolean |
|
void |
openList() |
void |
|
void |
removeItemAt(int index) |
void |
select(int startIndex, int endIndex) |
void |
setImageAt(int index, BBjImage image!) |
void |
selectIndex(int index) |
void |
setEditable(boolean edit) |
void |
setEditText(string text) |
void |
setFieldHeight(int height) |
void |
setMaximumRowCount(int max) |
void |
setMaxLength(int length) |
void |
setOpenWidth(int width) |
void |
setTextAt(int index, string text) |
Methods of BBjListEdit implemented for DragSource
Return Value | Method |
---|---|
int | getDragActions() |
string | getDragType() |
void | setDragActions(int actions) |
void | setDragType(string type) |
Methods of BBjListEdit implemented for DropTarget
Return Value | Method |
---|---|
int | getDropActions() |
void | setDropActions(int actions) |
BBjVector | getDropTypes() |
void | setDropTypes(BBjVector types) |
Methods of BBjListEdit implemented for Editable
Return Value | Method |
---|---|
boolean | isEditable() |
void | setEditable(boolean edit) |
Methods of BBjListEdit implemented for Focusable
Return Value | Method |
---|---|
boolean | isFocusable() |
void | setFocusable(boolean focus) |
Methods of BBjListEdit implemented for MouseWheelEnabled
Return Value | Method |
---|---|
int | getScrollWheelBehavior() |
void | setScrollWheelBehavior(int trav) |
Methods of BBjListEdit implemented for RecordSetBindable
Return Value | Method |
---|---|
void | bindRecordSet(BBjRecordSet recordset!, string fieldname) |
string | getBoundFieldName() |
Methods of BBjListEdit implemented for RecordSetFillable
Return Value | Method |
---|---|
void | fillFromRecordSet(BBjRecordSet recordset, string fieldname) |
Methods of BBjListEdit implemented for SimpleRecordSetBindable
Return Value | Method |
---|---|
BBjRecordSet | getBoundRecordSet() |
void | unbindRecordSet() |
Methods of BBjListEdit implemented for TabTraversable
Return Value | Method |
---|---|
boolean | isTabTraversable() |
void | setTabTraversable(boolean trav) |
Methods of BBjListEdit implemented for TextAlignable
Return Value | Method |
---|---|
int | getAlignment() |
void | setAlignment(int align) |
Methods of BBjListEdit implemented for TextControl
Methods of BBjListEdit implemented for Validateable
Return Value | Method |
---|---|
void | accept(boolean valid) |
string | getValidationText() |
Methods of BBjListEdit inherited from BBjControl
Events
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
---|---|---|---|
ON_CONTROL_VALIDATION |
v |
||
ON_DROP_TARGET_DROP |
D |
||
ON_EDIT_KEYPRESS |
N (Notify code 1) |
||
ON_EDIT_MODIFY |
e |
||
ON_GAINED_FOCUS |
f |
||
ON_LIST_CANCEL |
N (Notify code 4) |
||
ON_LIST_CHANGE |
N (Notify code 5) |
||
ON_LIST_CLICK |
l (lower case L) |
||
ON_LIST_CLOSE |
N (Notify code 3) |
||
ON_LIST_OPEN |
N (Notify code 1) |
||
ON_LIST_SELECT |
N (Notify code 2) |
||
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.
In BBj 13.0 and higher, the default BUI BBjListEdit is implemented as a custom control, to allow for CSS styling that isn't possible with native browser select elements. The native browser select elements provide a better user experience on mobile phone and tablet browsers; this option can be set to TRUE to specify that style.
The native listedit is really a hybrid -- it combines a text box with a native browser select element. It defines the following style names:
Style Name | Description |
---|---|
.BBjListEdit.bbj-native | The top level control. |
.BBjListEdit-text | The text input area, taking up most of the width of the control. |
.BBjListEdit-list | The list portion, taking up just enough space to the right of the control to show a dropdown arrow. |
The custom listbutton defines the following style names:
Style Name | Description |
---|---|
.BBjListEdit | The top level control. |
.BBjListEdit-text | The text input area, taking up most of the width of the control. |
.BBjListEdit-button | The button on the right edge of the control, showing a dropdown arrow. |
.BBjListEdit-imageWrapper | The right side of the button, which contains the dropdown arrow. |
.BBjListEdit-image | The dropdown arrow image. |
.BBjListEdit-listPanel | The dropdown container for the list. |
.BBjListEdit-listBox | The dropdown list. |
.BBjListEdit-item | An individual item in the dropdown list. |
.BBjListEdit-item.bbj-selected | The selected item. |
.BBjListEdit.bbj-disabled | The control is disabled. |
.BBjListEdit.bbj-focused | The control is focused. |
.BBjListEdit.bbj-readonly | The control is readonly. |
This section uses the list sample from the BBj BUI Showcase (code, demo).
With the default styles, the custom BBjListButton looks like this:
With the styles shown below, it looks like this:
|
See STBL("!OPTIONS","NATIVE_BROWSER_LIST")
Remarks
None.
Constants inherited from BBjControl
Example
|
See Also
LISTEDIT Mnemonic - Create a List Edit Control
CALLBACK Verb - Register BBj Subroutine
DWC Component: dwc-combobox
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.