Solved

Tooltip, drag with the component into which it was placed

Posted on 2011-03-05
1
300 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now