I need TreeNode to show tooltip text when node text is not fully visible on the screen (node's text width is larger than the current TreeView width)

Answered
0
0

Hi team,

I need TreeNode to show tooltip text when node text is not fully visible on the screen (node’s text width is larger than  the current TreeView width)

What can be done?

Kind regards!

  • You must to post comments
Best Answer
0
0

You might find the TreeView documentation to be helpful: https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview

Also the documentation for TreeNode: https://docs.wisej.com/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode

To show the toolTip, make sure to set ShowNodeToolTips = true on the treeView. You can do this in the designer.

You can set the ToolTipText for each node in the designer (click on the TreeView -> edit nodes -> select a node -> type a value for ToolTipText)

You will also want to set Scrollable = false, so the long node text doesn’t result in a scroll bar.

You can get the width of the TreeView using treeView1.Width, but unfortunately there is no property for the width of the node.

You can, however, get the length of the text of the Node. (Node.Text.Length). So if the length of the text is over a certain amount, you can set/display the ToolTip based on that.

See attached sample.

Attachment
  • mgmst
    • mgmst
    • Aug 23, 2024 - 5:15 am
    Love for your Comprehensive answer
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.