my previous post tells the basic usage of the ToolTip Manager Class , here i am with an example where in you can give different positioning for different tooltips.This means if i have two controls and for the first control i want the tooltip on right and for the second control i want the tooltip on bottom of the control, so this can be achived using the ToolTip Manager class and iam going to tell you how that can be achived.
Here we got to use the method called createToolTip(), which takes the parameters.
createToolTip(text:String, x:Number, y:Number, errorTipBorderStyle:String,
Here we will be usign the text,x,y parameters specifications only for our positioning.
First create an instance to the ToolTip Class and call the createToolTip method of the ToolTip Manager and asing the return value to the ToolTip Class instance.Like below.
private var tip:ToolTip;
tip = ToolTipManager.createToolTip(‘Right side tooltip’,
event.currentTarget.x + event.currentTarget.width + 10,
Call these staments on an event of the control for exmaple on mouseOver and we got to destroy the ToolTip instance after the usage like on mouseOut.So that the instance can be used for other control in the Application.
And to destroy the ToolTip instance use the method destroyToolTip(tip) of the ToolTip Manager Class.
Similarly we can write code for any positioning of the tooltip for any control.
Click here to view the Example.
Enjoy the post and tune on to see the source code for this Exmaple.