gui.getParentComponent

Returns a handle to the component one level up.

Prototype

  1. hParent = gui.getParentComponent ( hComponent )

Parameters

hComponent - valid GUI component handle


Return values

hParent - parent component handle on success, otherwise nil


Sample

  1. function onPropertyViewControlLabelButtonButtonClicked ( hView, hComponent )
  2.  
  3. local hInstance = gui.getParentComponent ( hComponent )
  4. if ( hInstance )
  5. then
  6. emitPropertyViewControlLabelButtonSignal ( hInstance, "onPropertyViewControlLabelButtonClicked ( hView, hComponent )" )
  7. end
  8. end
  9.  
  10. --------------------------------------------------------------------------------
  11.  
  12. function emitPropertyViewControlLabelButtonSignal ( hInstance, sSignal )
  13.  
  14. gui.sendEvent ( hInstance, sSignal )
  15. end

Available since ShiVa 2.0