gui.appendComboBoxItem
Adds a new entry at the end of a comboBox.
Prototype
hComboBoxItem = gui.appendComboBoxItem ( hComponent, [vValue], [kDataRole=kDataRoleDisplay] )
Description
Data roles determine how the data will be used. Directly correlates to Qt dataRoles.
Parameters
hComponent - valid GUI comboBox handle
vValue - optional value (string, number, ...)
kDataRole -/ optional predefined dataRole constant, default kDataRoleDisplay -
Return values
hComboBoxItem - handle to the new entry item
Sample
local hComponent = gui.getComponent ( "build.android.stl.type" ) if ( hComponent ) and ( gui.getComboBoxItemCount ( hComponent ) == 0 ) then gui.appendComboBoxItem ( hComponent, "None" ) gui.appendComboBoxItem ( hComponent, "STLPort static" ) gui.appendComboBoxItem ( hComponent, "STLPort shared" ) gui.appendComboBoxItem ( hComponent, "GNU Static" ) gui.appendComboBoxItem ( hComponent, "GNU Shared" ) end
Available since ShiVa 2.0