Mega Code Archive

 
Categories / Flex / Components
 

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>