Setup Factory 10

DlgComboBox.AddItem

DlgComboBox.AddItem

This is the first topic This is the last topic  

DlgComboBox.AddItem

This is the first topic This is the last topic  

OverviewExamples

number DlgComboBox.AddItem (

number ControlID,

string ItemText )

Example 1

Line = DlgComboBox.AddItem(CTRL_COMBOBOX_01, "ItemText");

Inserts the item "ItemText" into the '01' combo box control at the appropriate position and stores the resulting line number in the number "Line".

Example 2

tItemsToAdd = {"David", "Shelly", "Billy", "Bob", "Tanya"};

DlgComboBox.RemoveItem(CTRL_COMBOBOX_02, -1);

 

for nIndex, sItem in pairs(tItemsToAdd) do

   DlgComboBox.AddItem(CTRL_COMBOBOX_02, sItem);

end

Removes all items from the '02' combo box control, and adds a table of new items.

See also: Related Actions


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