Jump to content
uniGUI Discussion Forums

How to create a tooltip/hint for TUniTreeView

Recommended Posts

Hello everybody,

I have an application similar as the UniGui main demo application with the TUniTreeview at the left.

I would like to display a hint (tooltip) when the mouse hoovers over a node displaying the caption of that node.  In a normal Delphi VCL application, I would be able to work with the Hint and ShowHint properties of the treeview-component and change the hint in the mouse-events.  With UniGui, I understand that such things should be handled on the client side, this means the programming should be done in JS in the ClientEvents.ExtEvents property of the TUniTreeView component.

I found a Fiddle with an example on the internet of how a hint/tooltip can be displayed in JS: https://fiddle.sencha.com/#view/editor&fiddle/2flg

This is exactly what I want.  In fact, the example is more complicated, in the example a hint/tooltip is only shown when the caption of the node is not fully shown.  In my case, I want to always show the hint/tooltip, regardless if it is fully shown.

My question: In TUniTreeView.ClientEvents.ExtEvents.  In what event should I code ?  mousemove ?  mouseover ?  something else ?  And how should this JS code look like ?  (I am a JS novice)

Thank you for any suggestions

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now