D
Duraiswamy Lingappan
Hi,
I need to add tooltip text for each node in treeview control.
I am using tree view in Excel Userform.
How to add tooltip text to treeview?.
If i use the following example it is giving the following error:
Method or Data member not found.
It is complaining 'TreeView1.TooltipText' method not found at line
TreeView1.TooltipText = nodx.Tag
Private Sub Form_Load()
Dim nodx As Node
Set nodx = TreeView1.Nodes.Add(, , "r", "Root")
nodx.Tag = "tooltip text for root"
nodx.Expanded = True
Set nodx = TreeView1.Nodes.Add("r", tvwChild, "c1", "Child")
nodx.Tag = "tooltip text for child"
nodx.Expanded = True
Set nodx = TreeView1.Nodes.Add("child1", tvwChild, "level2c1",
"Sub-Child")
nodx.Tag = "tooltip text for sub-child"
nodx.Expanded = True
End Sub
Private Sub TreeView1_MouseMove(Button As Integer, Shift As Integer, x As
Single, y As Single)
Dim nodx As Node
Set nodx = TreeView1.HitTest(x, y)
If Not nodx Is Nothing Then
TreeView1.ToolTipText = nodx.Tag
Else
TreeView1.ToolTipText = ""
End If
End Sub
How to rectify this problem??
Thanks in advance.
Regards
Duraiswamy
I need to add tooltip text for each node in treeview control.
I am using tree view in Excel Userform.
How to add tooltip text to treeview?.
If i use the following example it is giving the following error:
Method or Data member not found.
It is complaining 'TreeView1.TooltipText' method not found at line
TreeView1.TooltipText = nodx.Tag
Private Sub Form_Load()
Dim nodx As Node
Set nodx = TreeView1.Nodes.Add(, , "r", "Root")
nodx.Tag = "tooltip text for root"
nodx.Expanded = True
Set nodx = TreeView1.Nodes.Add("r", tvwChild, "c1", "Child")
nodx.Tag = "tooltip text for child"
nodx.Expanded = True
Set nodx = TreeView1.Nodes.Add("child1", tvwChild, "level2c1",
"Sub-Child")
nodx.Tag = "tooltip text for sub-child"
nodx.Expanded = True
End Sub
Private Sub TreeView1_MouseMove(Button As Integer, Shift As Integer, x As
Single, y As Single)
Dim nodx As Node
Set nodx = TreeView1.HitTest(x, y)
If Not nodx Is Nothing Then
TreeView1.ToolTipText = nodx.Tag
Else
TreeView1.ToolTipText = ""
End If
End Sub
How to rectify this problem??
Thanks in advance.
Regards
Duraiswamy