DlgListBox.AddItem

number DlgListBox.AddItem ( 

number ControlID,

string Text )

Example 1

index = DlgListBox.AddItem(CTRL_LIST_BOX, "Add me!!  NOW!!!");

Adds an item with text "Insert me!!  NOW!!!" into the list box control with control id "CTRL_LIST_BOX."

Example 2

index = DlgListBox.AddItem(nControlID, InsertText);

Adds an item with text stored in the variable "InsertText" into the list box control whose control ID is stored in the variable "nControlID."

Example 3

DlgListBox.SetUpdate(nControlID, false);

for count = 1, 10 do
    index = DlgListBox.AddItem(nControlID, "Added Item " .. count);
end

DlgListBox.SetUpdate(nControlID, true);

This example disables updating of the list box control whose control id is stored in the variable "nControlID," adds ten items, and enables updating.

See also:  Related Actions