Solved

Tooltip, drag with the component into which it was placed

Posted on 2011-03-05
1
308 Views
Last Modified: 2012-05-11
I have displayed a tooltip on managerContainer panel with the code:

var p:Point = new Point(m.x+managerContainer.x,m.y+managerContainer.y+m.height);
                        p = this.contentToGlobal(p);
                        var s:String =note;
                        var tip:ToolTip = ToolTipManager.createToolTip(s,
                              p.x , p.y
                              
                        ) as ToolTip;

But my panel is a draggable one. Now I want the tooltip to be dragged when the panel is dragged without destroying and creating the tooltip over and over again. How to do that, do you know?
0
Comment
Question by:btocakci
1 Comment
 
LVL 17

Accepted Solution

by:
deepanjandas earned 500 total points
ID: 35127420
Try this:
var tip:ToolTip;//declare this outside the function to have a global scope of this variable

var p:Point = new Point(m.x+managerContainer.x,m.y+managerContainer.y+m.height);
p = this.contentToGlobal(p);
var s:String =note;
if( tip == null ){
    tip = ToolTipManager.createToolTip(s, p.x , p.y ) as ToolTip;
}
tip.move( p.x, p.y );

Open in new window


//remember to destroy the tooltip on hide.

Tutorial sample here.
Warm Regards
Deepanjan Das

 
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Flex Air Internet connectivity 5 546
Advanced Datagrid with checkbox 4 306
how to create a customized menu in Flex ? 1 580
Accessing GPS on Windows Tablet using Adobe Air 4 406
First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question