wxTreeCtrl tooltips

Milan Babuskov milanb at panonnet.net
Tue Jan 8 09:17:00 PST 2008


Gerald Brandt wrote:
> Is there a way to set a tooltip for a specific item in a tree control?

Yes.

You can process the mouse movement event, convert to tree coordinates to 
get the item underneath and then use wxTipWindow to show the tip. Make 
sure you use wxTipWindow::SetBoundingRect around the tree item so that 
it disappears when you move the mouse away.

I used this approach in FlameRobin to show tooltips while mouse is 
hovering over links in wxHtmlWindow, but I guess it can be used with 
wxTree in the same way.

HTH

-- 
Milan Babuskov
http://www.guacosoft.com




More information about the wx-users mailing list