List Box Control

A list box control is a tool used to present a scrollable list of text items that can be selected by the user. There are two styles for this control, a standard list box and a checklist box. A checklist box is a standard list box with the addition of check boxes for each item. Other features of this control include the ability to select multiple items and sort them alphabetically. An example of a list box control and a checklist box can be seen below.

A 'normal' List Box control:

            

A 'checked' List Box control:

 

 

Additional features of the list box control can be found in the following two categories:

 

Notification Messages

A notification message is triggered whenever the user interacts with a control, or whenever user interaction affects a control in some way. Each notification message consists of a number that identifies the type of interaction that has occurred, and a table containing details specific to that type of interaction. These two values are passed to the screen's On Ctrl Message event as the event variables e_MsgID and e_Details.

Note: Notification messages are not triggered when actions interact with this control.

(number) e_MsgID
A numeric constant that represents the specific notification message that was fired by the screen control. See the e_MsgID column below for all possible message ids that can be fired by a list box control.

(table) e_Details
A table of additional details that may be passed by the control when certain notification messages are fired. See the e_Details column below for the kinds of details that are returned and the table indexes that you can use to access them. For example, you can access the item "Index" from this table by using e_Details.Index.

e_MsgID

e_Details

Description

MSGID_CLICKED

(number) Index - The index of the item that was clicked.

(string) Text - The text of the item that was clicked.

(boolean) Selected - The selected state of the item.

(boolean) Checked - The checked state of the item. (This applies to Checklist box style)

Fired when an item in the list is clicked on.

MSGID_ONSELCHANGED

nil

Fired when the list box selection changes.

 

Related Actions

The following actions are available for interacting with a list box control:

 

DlgListBox.AddItem

DlgListBox.DeleteItem

DlgListBox.FindItem

DlgListBox.GetCount

DlgListBox.GetItemProperties

DlgListBox.GetProperties

DlgListBox.GetSelected

DlgListBox.GetSelectedCount

DlgListBox.InsertItem

DlgListBox.SetItemProperties

DlgListBox.SetProperties

DlgListBox.SetUpdate