II. GUI Basics
Chapter 10. Widgets Attribute
'clearLabel' is a method that is used with 'action' event to clear text in the widget, button, edit,
or other widgets containing text (have 'setLabel' attribute applied).
addActionTarget = "[String]
widget name, [Constant]
[String] is the name of the widget
[Constant] the event to listen on
[clearLabel] the method signature
clearLabel is achieved through 'action' event.
An action is a higher level event abstraction.
It is triggered by different lower level events.
The button gets the action Event invoked when a mouse released
event occurs WHILE the mouse is still
within the boundaries of the button control
it is invoked on a key released
event WHILE the button still is in focus.
To demostrate the action event we will create a clear an Edit control.
<Edit setShape="10,10,80,25" setName="name" addActionTarget="name,action,clearLabel=''"
<Button setShape="10,40,80,25" setLabel="Clear" addActionTarget="name,action,clearLabel=''"
The Edit widget, 'name', will clear its text (if 'Enter' key is hit)
The Button widget will clear the Edit 'name's text