wxTreeCtrl tool tips

Hi,

I want to add tooltips to the entries in a wxTreeCtrl, is there is simple
way to do this that I've missed?

The tooltip needs to contain text that's not the same as the text displayed
in the Tree.

Unless there's a simple way to associate a wxToolTip with a tree item and
have it automatically displayed I assume I'll have to do something more
convoluted like waiting for a mouse-enters-tree window event, then get mouse
coords and do it again some time later, then if they don't change fire up a
tool tip window. But I'd really rather not :slight_smile:

Cheers,
Rob

Robin Stevens wrote:

Hi,

I want to add tooltips to the entries in a wxTreeCtrl, is there is simple
way to do this that I've missed?

The tooltip needs to contain text that's not the same as the text displayed
in the Tree.

Unless there's a simple way to associate a wxToolTip with a tree item and
have it automatically displayed I assume I'll have to do something more
convoluted like waiting for a mouse-enters-tree window event, then get mouse
coords and do it again some time later, then if they don't change fire up a
tool tip window. But I'd really rather not :slight_smile:

I'm afraid that's what you'll have to do. The wxTreeCtrl has a HitTest method to help you convert mouse coords into a tree item.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!