Setup Factory 10

DlgListBox.InsertItem

DlgListBox.InsertItem

This is the first topic This is the last topic  

DlgListBox.InsertItem

This is the first topic This is the last topic  

OverviewExamples

number DlgListBox.InsertItem (

number ControlID,

number Index,

string Text )

Example 1

index = DlgListBox.InsertItem(CTRL_LIST_BOX, 4, "Insert me!!  NOW!!!");

Inserts an item with text "Insert me!!  NOW!!!" into the 4th position of the list box control with control id "CTRL_LIST_BOX."

Example 2

inserted_location = DlgListBox.InsertItem(nControlID, -1, InsertText);

Inserts an item with the text stored in the variable "InsertText" into the last position of the list box control whose control ID is stored in the variable "nControlID."

Example 3

DlgListBox.SetUpdate(nControlID, false);

 

for count = 1, 10 do

   item_number = DlgListBox.InsertItem(nControlID, -1, "Inserted 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", inserts ten items at the end of the control, and enables updating.

See also: Related Actions


Learn More: Indigo Rose Software - Setup Factory - Buy Now - Contact Us