Tool tips

Hi,

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.

Regards,


Laurent,

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.

Rene

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

Cheers,
Bertrand.

Hi Bertrand,

Thanks. I did not know that.

Maybe the documentation comments for TGToolTip should be updated then ?

Regards,

Hi,

This feature was available in v5.16 (see the GUI section at root.cern.ch/root/Version516.news.html ).

The docimentation is updated in SVN trunk.

Cheers, Ilka