TGToolTips

From: Giorgio De Nunzio <giorgio.denunzio_at_aliceposta.it>
Date: Tue, 27 Sep 2005 21:04:11 +0200


Hi again..
When I move the mouse pointer on a graphical object (a descendent of TEllipse) I want a tool tip to appear.
In the ExecuteEvent method I have written something like:

   case kMouseEnter:

      tip = new TGToolTip(gClient->GetRoot(), (const TGFrame *) 0, "Hey!", 0);

      tip->Show(px, py);
      break;
   case kMouseLeave:
      delete tip;
      break;

I am not sure I correctly understand the meaning of the 2nd ctor parameter (the frame associated to the tooltip); I put it to 0... It works, more or less: the tool tip text appears when the mouse enters the object, it disappears when the mouse leaves) but: 1) it does not appear at the mouse position (I have to understand what is the coordinate system origin, I think it is referring to the whole screen) 2) while the mouse is on the object (the tooltip is shown), if I do a "ALT+TAB", exposing another application while mine goes to the background, the tooltip remains in front! It lives its own life and it is impossible to delete it (till I close my application). This probably depends on the "parent" parameter (the first one). How can I avoid this strange problem?

Thanks again..
Giorgio Received on Tue Sep 27 2005 - 21:00:50 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:12 MET