Solved

Tooltip, drag with the component into which it was placed

Posted on 2011-03-05
1
315 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

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…
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

751 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