gui.getIcon
Returns a handle to an icon.
Prototype
hIcon = gui.getIcon ( sIconIdentifier )
Description
Returns a handle to an icon from its identifier string. Useful for components that take icons, like buttons or tree items.
Parameters
sIconIdentifier - icon identifier string, most likely defined in the XML
Return values
hIcon - icon handle
Sample
function onMainViewInit_Android ( ) if ( not job.isAvailable ( job.kTypeAuthoringForAndroid ) ) then local hComponent = gui.getComponent ( "properties.android.inactive.info" ) if ( hComponent ) then gui.setButtonText ( hComponent, gui.getLocalizedString ( "Target not available" ) ) gui.setButtonIcon ( hComponent, gui.getIcon ( "Warning" ) ) end return false end -- etc.
Available since ShiVa 2.0