Jump to content

How to create a tooltip/hint for TUniTreeView


cdev

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...