[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A list box's type is "List Box".
Listboxes publish the following attributes.
Style
One of `lbfsBump', `lbfsSimple', `lbfsSunken', `lbfsRaised', `lbfsNone' or `lbfsFlat'. Determines the style of frame for the component.
Alpha
The alpha of the overlay texture.
HiAlpha
The alpha of the selection bar texture.
Columns
The number of columns in the list control. For every column the following properties are present (X denotes the current column number):
DefaultSortCol
List rows are sorted based on the content of this column.
Background
Texture to use as background.
Highlight
Texture to use for the selection bar.
Listboxes support the following skin attributes.
OverlayTextureAlpha
The alpha value of the overlay texture.
Texture
Used for overlaying the frame area with the global texture.
TreeCollapsed
Used to depict the item as collapsed (if it has any children)
TreeExpanded
Used to depict the item as expanded (if it has any children)
TreeVertLine
Used to connect to items on the same tree level.
TreeHorzLine
Used to connect to and item with its parent.
TreeChkUnmarked
Stateful entries can be marked/unmarked. This is used to draw the unmarked case.
TreeChkMarked
Stateful entries can be marked/unmarked. This is used to draw the marked case.
TreeGrpUnmarked
Grouped entries are either marked or unmarked. This is used to draw the unmarked case.
TreeGrpMarked
Grouped entries are either marked or unmarked. This is used to draw the marked case.
List boxes send the following signals.
signalListBoxSelectionChanged
Occurs when the currently selected item changes.
signalListBoxStateChanged
Occurs when the state of a stateful column changes.
signalListBoxFocused
Occurs when the list box gains focus.
signalListBoxScrolled
Occurs when the scroll bar at the side of the list box is used.
List boxes understand the following actions.
InsertItem
Inserts a new item. See below for parameters. Note that an item does not need to have text or image or state, but it should have one of the above.
This sections describes the input parameters understood by the list box's `InsertItem' action.
Name | Type | Description |
| | Text for the item in column X. |
| | Pathname of the image in column X. |
| | `true' if the item in column X needs a state box (like a check box or radio button). |
| | State of the item in column X. |
| | If `true', the item in column X will have a radio button-type state box instead of the default check box-style state. |
| | 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. |
| | This is the same as `aligntxtX', except that it operates on the image. |
| | An optional parameter you can attach to an item in the row. |
| | 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. |
| | 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
Deletes a row from the listbox.
This sections describes the input parameters understood by the list box's `DeleteItem' action.
Name | Type | Description |
| | This string is looked up is the listbox' sorting column. If it is found the corresponding row is deleted. |
| | 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
Returns the text, state and param values of the selected item if there is one.
This sections describes the input parameters understood by the `GetSelectedItem' action of the list box.
Name | Type | Description |
| | Requests the text for the item in column X. |
| | Requests the state of the item in column X. |
| | 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 |
| | Contains the text for the item in column X if it was requested. |
| | Contains the state of the item in column X if it was requested. |
| | 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
Returns the text, state and param values of a specific row.
This sections describes the input parameters understood by the list box's `GetItem' action.
Name | Type | Description |
| | Specifies the row number of the item we are interested in. |
| | Requests the text for the item in column X. |
| | Requests the state of the item in column X. |
| | 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 |
| | Contains the text for the item in column X if it was requested. |
| | Contains the state of the item in column X if it was requested. |
| | Contains the param value of the item in column X if it was requested. |
| | Is true, if there is data returned. False if not (e.g. the row does not exist) |
ClearList
Deletes all entries from the list.
None.
None.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated using texi2html 1.76.