gui.appendComboBoxItem

Adds a new entry at the end of a comboBox.

Prototype

  1. 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

  1. local hComponent = gui.getComponent ( "build.android.stl.type" )
  2. if ( hComponent ) and ( gui.getComboBoxItemCount ( hComponent ) == 0 ) then
  3. gui.appendComboBoxItem ( hComponent, "None" )
  4. gui.appendComboBoxItem ( hComponent, "STLPort static" )
  5. gui.appendComboBoxItem ( hComponent, "STLPort shared" )
  6. gui.appendComboBoxItem ( hComponent, "GNU Static" )
  7. gui.appendComboBoxItem ( hComponent, "GNU Shared" )
  8. end

Available since ShiVa 2.0