gui.getComboBoxItemCount

Counts all items inside a comboBox.

Prototype

  1. nCount = gui.getComboBoxItemCount ( hComponent )

Description

Counts all items inside a comboBox.


Parameters

hComponent - valid GUI comboBox handle


Return values

nCount - number 0..n


Sample

  1. function onMainViewLoadConfigurations ( )
  2.  
  3. local hComponent = gui.getComponent ( "toolbar.config" )
  4. if ( hComponent ) and ( gui.getComboBoxItemCount ( hComponent ) == 0 ) then
  5. gui.appendItem ( hComponent, "Default" )
  6. end
  7. -- etc.

Available since ShiVa 2.0