gui.appendComboBoxItems
Bulk append new items to a comboBox.
Prototype
tComboBoxItems = gui.appendComboBoxItems ( hComponent, nCount )
Description
The returned table must be looped through to set item text, data, etc.
Parameters
hComponent - valid GUI component handle
nCount - number 1..n of how many items you want to insert
Return values
tComboBoxItems - table of (yet empty) appended items
Sample
if ( nTotalItemsToInsert > 0 ) then tComboItems = gui.appendComboBoxItems ( hComboBox, nTotalItemsToInsert ) end if ( tComboItems ) then for i = 1, nTotalItemsToInsert do if ( tItems[i] and #tItems[i] == 3 ) then gui.setComboBoxItemText ( tComboItems[i], tItems[i][1] ) gui.setComboBoxItemUserData ( tComboItems[i], tItems[i][2] ) gui.setComboBoxItemData ( tComboItems[i], gui.kDataRoleUser + 1, tItems[i][3] ) end end
Available since ShiVa 2.0