List Box Object - Get Item Data

Returns the data associated with an item in a List Box Object.

Each item in a List Box Object can have data associated with it. The item is the visible part; it's what shows up in the list, and it's what the user will see as the item. The data is an optional invisible part; it doesn't show up in the list, and is only visible to the "List Box Object - Get Item Data" action. You could think of the data as being kept in another internal list of items that is synchronized with the "main" list of items automatically.

This feature allows you to display one thing in the list box, and store another thing "with" that item for your own purposes. For example, you could display the name of a song in the list box, and store the full path and filename to the appropriate MP3 as the item's data. This way, the user could choose from a list of songs, without having to see the full paths and filenames...but you would still be able to know what file to load into the MP3 Player, by using the selected item's data.

Action ID:
Action Category:
Action List Syntax:

121
List Box Object
<<VARIABLE>>
= ListBoxObject[<<OBJECT>>].GetItemData (<<INDEX>>)

Settings

List Box

Name:

The name of the List Box Object.

Item

Index:

The zero-based index of the item whose associated data will be returned.

Variable

Store result in variable:

The name of the variable that the data will be stored in.

Error Codes

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

MSG_ERR_LIST_BOX_OBJECT_GET_ITEM_DATA

MSG_ERR_LIST_BOX_OBJECT_GET_ITEM_DATA
MSG_ERR_OBJECT_NOT_FOUND
<<LISTNAME>>

2

MSG_ERR_LIST_BOX_OBJECT_GET_ITEM_DATA

MSG_ERR_LIST_BOX_OBJECT_GET_ITEM_DATA
MSG_ERR_LIST_BOX_OBJECT_UNAVAILABLE
<<LISTNAME>>

3

MSG_ERR_LIST_BOX_OBJECT_GET_ITEM_DATA

MSG_ERR_LIST_BOX_OBJECT_GET_ITEM_DATA
MSG_ERR_MALFORMED_NUMERIC_INDEX
<<INDEX>>

4

MSG_ERR_LIST_BOX_OBJECT_GET_ITEM_DATA

MSG_ERR_LIST_BOX_OBJECT_INDEX_OUT_OF_RANGE
MSG_ERR_MALFORMED_NUMERIC_INDEX
<<INDEX>>
<<LISTNAME>>

Examples

Adding items to a list box (with data)