Show tool tip ballon on each node of a treeview
Re: Show tool tip ballon on each node of a treeview
If you store the tooltips for each node in the .Tag property of the nodes then you can use this snippet:
Code:
Private Sub TreeView1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim oNode As ComctlLib.Node
If Button <> 0 Or Shift <> 0 Then Exit Sub
Set oNode = TreeView1.HitTest(x, y)
If oNode = Nothing Then Exit Sub
TreeView1.ToolTipText = oNode.Tag
End Sub
Re: Show tool tip ballon on each node of a treeview
Quote:
Originally Posted by
Arnoutdv
If you store the tooltips for each node in the .Tag property of the nodes then you can use this snippet:
Code:
Private Sub TreeView1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim oNode As ComctlLib.Node
If Button <> 0 Or Shift <> 0 Then Exit Sub
Set oNode = TreeView1.HitTest(x, y)
If oNode = Nothing Then Exit Sub
TreeView1.ToolTipText = oNode.Tag
End Sub
not work... error in
...
If oNode = Nothing Then Exit Sub
TreeView1.ToolTipText = oNode.Tag
...
Re: Show tool tip ballon on each node of a treeview
Code:
If oNode Is Nothing Then Exit Sub
Re: Show tool tip ballon on each node of a treeview
Should be: If oNode Is Nothing Then Exit Sub