Solved

Tooltip, drag with the component into which it was placed

Posted on 2011-03-05
1
319 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

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…
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

630 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