0

Hello, folks!

So i'm trying to add a tooltip to a treenode, But with no luck. I've tried things like:

Treeview.nodes(0).tooltiptext = "Hello"

Edited by Olivis: n/a

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Olivis
1

Hi,

You should do something like this:

Private treeViewWithToolTips As TreeView

Private Sub InitializeTreeViewWithToolTips() 
    treeViewWithToolTips = New TreeView()
    Dim node1 As New TreeNode("Node1")
    node1.ToolTipText = "Help for Node1"
    Dim node2 As New TreeNode("Node2")
    node2.ToolTipText = "A Tip for Node2"
    treeViewWithToolTips.Nodes.AddRange(New TreeNode() {node1, node2})
    treeViewWithToolTips.ShowNodeToolTips = True
    Me.Controls.Add(treeViewWithToolTips)

End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.