Can Tree nodes have a tooltip ?

Hi,

Can individual nodes (items) in a Tree have a tooltip ? I can see how to set an Icon and Caption, but not a tooltip. I also noticed that the tree itself can have a tooltip, but that it just one for the whole tree, not one for each item.

If not, can you provide any ideas on how this could be done ?

Thanks
Andrew

BTW, did anyone have any ideas on my follow questions I asked for the “Tree Questions” topic I posted a couple of days ago, after Jouni and Joonas initially responded ?

Currently there is no way of getting per three-node tooltips. Sorry.

One way would be:

  • Extend com.itmill.toolkit.ui.Tree on server side and add API for assigning tooltips and add those tooltips to PaintTarget in paintContents
  • Extend com.itmill.toolkit.terminal.gwt.client.ui.ITree on client-side and read the tooltips from UIDL and use com.itmill.toolkit.terminal.gwt.client.ITooltip to show them.

Even though this requires some work, it might right thing to do as you could add other missing features to the Tree at the same time.

If you decide to implement these, please tell about it here on the forum. And if you would like to contribute the code to Toolkit, please write a feature requirement ticket and attach the code to the ticket.


Tree Tooltip