Tool tips


Is there an existing way to draw custom tool tips using some TG* classes ?

In the attached figure, what I’d like to achieve is to put a small window close to the mouse pointer, with the content of the window changing to give some information about the “shape” below the pointer.



Implement the GetObjectInfo for your class (see examples in many ROOT classes,
TH1, TF1, etc). When activating the “Show EventStatus” from teh canvas “View” menu,
this information will be displayed in the statusbar window when moving the mouse on top of your objects.


Hi Rene,

Thanks, but I know the event status. What I’d like is really a small window right under the focus. I’ve played a bit with TGToolTip, but this one is limited to a one line text, which is about too few :wink:

Hi Laurent,

FYI, multiline tooltips have been implemented since 2007-05-04 15:16:

  • [r18655] gui/src/TGLabel.cxx: From Valeriy Onuchin:
    possiblity to have multiline labels/tooltips


Hi Bertrand,

Thanks. I did not know that.

Maybe the documentation comments for TGToolTip should be updated then ?



This feature was available in v5.16 (see the GUI section at ).

The docimentation is updated in SVN trunk.

Cheers, Ilka