gui.getIcon

Returns a handle to an icon.

Prototype

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

  1. function onMainViewInit_Android ( )
  2.  
  3. if ( not job.isAvailable ( job.kTypeAuthoringForAndroid ) ) then
  4. local hComponent = gui.getComponent ( "properties.android.inactive.info" )
  5. if ( hComponent ) then
  6. gui.setButtonText ( hComponent, gui.getLocalizedString ( "Target not available" ) )
  7. gui.setButtonIcon ( hComponent, gui.getIcon ( "Warning" ) )
  8. end
  9. return false
  10. end
  11. -- etc.

Available since ShiVa 2.0