gui.setComboBoxItemData

Associates data with a comboBox item.

Prototype

  1. bOk = gui.setComboBoxItemData ( hComboBoxItem, kDataRole, vValue )

Description

Check the kDataRole* constants for more info.


Parameters

hComboBoxItem - valid comboBox item handle
kDataRole - predefined data role constant
vValue - data role value you wish to associate


Return values

bOk - true on success


Sample

  1. if ( hItem and hFile ) then
  2. gui.setComboBoxItemData ( hItem, gui.kDataRoleDisplay , hFile )
  3. gui.setComboBoxItemData ( hItem, gui.kDataRoleDecoration , hFile )
  4. gui.setComboBoxItemData ( hItem, gui.kDataRoleUser , hFile )
  5. end

Available since ShiVa 2.0