Use ToolTipManager to create an error tip : ToolTipManager « Components « Flex






Use ToolTipManager to create an error tip

Use ToolTipManager to create an error tip
      
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
    import mx.managers.ToolTipManager;
    import mx.controls.ToolTip;
    public var myTip:ToolTip;
    private function createBigTip(event:Event):void {
        myTip = ToolTipManager.createToolTip("Error",
                                             event.currentTarget.x + event.currentTarget.width,
                                             event.currentTarget.y,
                                             "errorTipRight") as ToolTip;
    }
    private function destroyBigTip():void {
        ToolTipManager.destroyToolTip(myTip);
    }
  </mx:Script>
    <mx:Panel rollOver="createBigTip(event)" rollOut="destroyBigTip()">
        <mx:Button label="Cancel" toolTip="Cancel and exit."/>
    </mx:Panel>
</mx:Application>

   
    
    
    
    
    
  








Related examples in the same category

1.Enable tooltip with ToolTipManagerEnable tooltip with ToolTipManager
2.Set tooltip show delay with ToolTipManagerSet tooltip show delay with ToolTipManager
3.Set tooltip hide delay with ToolTipManagerSet tooltip hide delay with ToolTipManager
4.Change value of ToolTipManager.currentToolTip.text to a valueChange value of ToolTipManager.currentToolTip.text to a value
5.Create Tooltip with ToolTipManagerCreate Tooltip with ToolTipManager
6.Remove a tooltip with ToolTipManagerRemove a tooltip with ToolTipManager
7.Set time that a tool tip is visible with ToolTipManagerSet time that a tool tip is visible with ToolTipManager
8.Use Application's initialize event to set the starting values for the ToolTipManagerUse Application's initialize event to set the starting values for the ToolTipManager