DlgListBox.GetItemProperties

table DlgListBox.GetItemProperties ( 

number ControlID,

number Index )

Description

Gets the properties of an item in a list box control given its index.

Note: This action will only work if called from a screen's events and if the named control is on the current screen.

Parameters

ControlID

(number) The numeric ID of the list box control whose item properties you want.

Index

(number) The index of the item whose properties you want. The first item in the list has an index of 1. You can use -1 to get the properties of the last item in the list.

Returns

(table) A table containing the list box item's properties, indexed by the following categories:

KEY

TYPE

DESCRIPTION

Checked

boolean

Whether or not the list box item is "checked." This key is only valid if the list box is using the Checklist Box style. If true is returned the item is checked. A false result means it is not checked, or the list box is not using the Checklist Box style. You can access this value using tb.Checked.

ItemData

string

The list box item's associated data string. You can access this value using tb.ItemData.

Selected

boolean

Whether or not the item is currently selected. If true is returned, the item is selected and if false is returned, it is not. You can access this value using tb.Selected.

Text

string

The list box item's text. You can access this value using tb.Text.

If the current screen does not contain the control or item, this action will fail. If this action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions