Required: Aspire UI Components Standard Edition
The uiToolTips manager implements the use of pop-up tool tips.
To use tool tips in your application, you must first initialize the uiToolTips class by calling the uiToolTips.initialize() method:
// ** initializes the uiToolTips class passing the stage object for the parameter ** uiToolTips.initialize(stage);
The uiToolTips manager works by monitoring mouse movement and checking if the topmost display object under the mouse cursor has a toolTip property defined. If the toolTip property exists and returns a value, the uiToolTips manager shows a tool tip based on that value. The tool tip is dismissed when the mouse cursor moves out of the bounds of the display object or the mouse is pressed down.
import com.ghostwire.ui.containers.uiBox; import com.ghostwire.ui.controls.uiLabelButton; import com.ghostwire.ui.controls.uiTextInput; import com.ghostwire.ui.managers.uiCursors; import com.ghostwire.ui.managers.uiToolTips; uiCursors.initialize(stage); uiToolTips.initialize(stage); var searchtxt:uiTextInput = new uiTextInput(); var searchbtn:uiLabelButton = new uiLabelButton("","search.png"); searchbtn.toolTip = "Search"; var searchbox:uiBox = new uiBox(); searchbox.spacing = 4; searchbox.move(10,10); searchbox.addChild(searchtxt); searchbox.addChild(searchbtn); addChild(searchbox);
For more information on the members of the com.ghostwire.ui.managers.uiToolTips class, please refer to the API Reference.