gui.getComboBoxItemUserData
Retrieves data attached to a GUI component.
Prototype
vValue = gui.getComboBoxItemUserData ( hComboBoxItem )
Description
This function pair (set/get) allows you to attach any kind of variable to a GUI component and retrieve it later.
Parameters
hComboBoxItem - combo box item handle
Return values
vValue - string, number, etc. that was attached
Sample
function onPropertyViewControlFileComboBoxChanged ( hView, hComponent ) local hInstance = gui.getParentComponent ( hComponent ) local hSelectedItem = gui.getComboBoxSelectedItem ( hComponent ) local hFile = gui.getComboBoxItemUserData ( hSelectedItem ) local hReferenceButton = gui.getComponentFromInstance ( hInstance, "anchorButton" ) if ( hReferenceButton ) then gui.setReferenceButtonFile ( hReferenceButton, hFile ) end emitPropertyViewControlFileComboSignal ( hInstance, "onPropertyViewControlFileComboValueHasChanged ( hView, hComponent, hFile )" ) end
Available since ShiVa 2.0