0 Replies Latest reply on Oct 6, 2009 5:10 PM by GKROCKZ

    Custom Tooltip Problem


      I have defined a custom tooltip class that will be called when i mouse over the target item.  For this i am creating an instance of custom tooltip in the tooltip create event and assigning it to the the events tooltip. On the tooltip show event i am trying to position the tooltip based on its dynamic height and width. But the problem i am having is the tooltip's height and width seem to have the default value and it does not get populated by the show event. Is there any way that i can resolve the problem?



               private function CreateTooltipHandler(event:ToolTipEvent):void
                     ttip = new ItemToolTip(this.iUid.toString(),
                    event.toolTip = ttip; 
               * Handler for showing a tooltip
               private function ShowTooltipHandler(event:ToolTipEvent):void
                    var gapwidth:*  = event.currentTarget.x + event.currentTarget.width + event.toolTip.x;
                    var gapheight:* = event.currentTarget.y + event.currentTarget.height + event.toolTip.y; 
                   if(gapwidth > 550)
                        event.toolTip.x = gapwidth - 400;                                   
                    if(gapheight > 700)
                        event.toolTip.y = gapheight - 400;