[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A list box's type is "List Box".
Listboxes publish the following attributes.
Style
Alpha
HiAlpha
Columns
DefaultSortCol
Background
Highlight
Listboxes support the following skin attributes.
OverlayTextureAlpha
Texture
TreeCollapsed
TreeExpanded
TreeVertLine
TreeHorzLine
TreeChkUnmarked
TreeChkMarked
TreeGrpUnmarked
TreeGrpMarked
List boxes send the following signals.
signalListBoxSelectionChanged
signalListBoxStateChanged
signalListBoxFocused
signalListBoxScrolled
List boxes understand the following actions.
InsertItem
This sections describes the input parameters understood by the list box's `InsertItem' action.
Name | Type | Description |
textX |
iString*
| Text for the item in column X. |
imageX |
iString*
| Pathname of the image in column X. |
statefulX |
bool
| `true' if the item in column X needs a state box (like a check box or radio button). |
stateX |
bool
| State of the item in column X. |
groupstateX |
bool
| If `true', the item in column X will have a radio button-type state box instead of the default check box-style state. |
aligntxtX |
int
| Alignment of the text in column X. By default, all text is left-aligned. This can be 0 or 1. Zero is left-align; 1 is right-align. If there is state, it will be aligned with the text. |
alignimgX |
int
| This is the same as `aligntxtX', except that it operates on the image. |
paramX |
int
| An optional parameter you can attach to an item in the row. |
selectable |
bool
| If `false', then the item is not selectable and will never be highlighted. This is useful for items that have state of some sort and aren't intended to be "picked" out of a list. |
parent |
int
| Key that identifies the parent of which this item should be a child. This will turn the new item into a child item. |
This sections describes the output parameters of the list box's `InsertItem' action.
Name | Type | Description |
`id' | `int' | Unique key of this item. This can be saved and used as the value of a parent when adding children to an item, or it may be saved and used with the `GetState' action. |
DeleteItem
This sections describes the input parameters understood by the list box's `DeleteItem' action.
Name | Type | Description |
text |
iString*
| This string is looked up is the listbox' sorting column. If it is found the corresponding row is deleted. |
id |
iString*
| This string is looked up is the listbox' sorting column. If it is found the corresponding row is deleted. |
This sections describes the output parameters of the list box's `DeleteItem' action.
Name | Type | Description |
`result' | `int' | The row number of the deleted row. If deletion failed -1 is returned. |
GetSelectedItem
This sections describes the input parameters understood by the `GetSelectedItem' action of the list box.
Name | Type | Description |
textX |
iString*
| Requests the text for the item in column X. |
stateX |
bool
| Requests the state of the item in column X. |
paramX |
int
| Requests the param value of the item in column X. |
This sections describes the output parameters of the list box's `GetSelectedItem' action.
Name | Type | Description |
textX |
iString*
| Contains the text for the item in column X if it was requested. |
stateX |
bool
| Contains the state of the item in column X if it was requested. |
paramX |
int
| Contains the param value of the item in column X if it was requested. |
`success' | `bool' | Is true, if there is data returned. False if not (e.g. no item was selected) |
GetItem
This sections describes the input parameters understood by the list box's `GetItem' action.
Name | Type | Description |
row |
int
| Specifies the row number of the item we are interested in. |
textX |
iString*
| Requests the text for the item in column X. |
stateX |
bool
| Requests the state of the item in column X. |
paramX |
int
| Requests the param value of the item in column X. |
This sections describes the output parameters of the list box's `GetItem' action.
Name | Type | Description |
textX |
iString*
| Contains the text for the item in column X if it was requested. |
stateX |
bool
| Contains the state of the item in column X if it was requested. |
paramX |
int
| Contains the param value of the item in column X if it was requested. |
success |
bool
| Is true, if there is data returned. False if not (e.g. the row does not exist) |
ClearList
None.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |