How to display node's information for each node in WinForms TreeviewAdv?
Supertooltip
We can show the node's information in SuperToolTip when mouse is hovering over a WinForms TreeNodeAdv using TreeViewAdv's MouseHover event.
C#
private void treeViewAdv1_MouseHover(object sender, EventArgs e) { Point p = this.treeViewAdv1.PointToClient(new Point(MousePosition.X, MousePosition.Y)); Syncfusion.Windows.Forms.Tools.TreeNodeAdv node = this.treeViewAdv1.PointToNode(p); if(node.TextBounds.Contains(p)) { ToolTipInfo t1 = new ToolTipInfo(); t1.Body.Text = node.Text; Point mouseLoc = Control.MousePosition; mouseLoc.Offset(0, 0); this.superToolTip1.Show(t1, mouseLoc); } }
VB
Private Sub treeViewAdv1_MouseHover(ByVal sender As Object, ByVal e As EventArgs) Dim p As Point = Me.treeViewAdv1.PointToClient(New Point(MousePosition.X, MousePosition.Y)) Dim node As Syncfusion.Windows.Forms.Tools.TreeNodeAdv = Me.treeViewAdv1.PointToNode(p) If node.TextBounds.Contains(p) Then Dim t1 As ToolTipInfo = New ToolTipInfo() t1.Body.Text = node.Text Dim mouseLoc As Point = Control.MousePosition mouseLoc.Offset(0, 0) Me.superToolTip1.Show(t1, mouseLoc) End If End Sub
Conclusion
I hope you enjoyed learning about how to display node's information for each node in WinForms TreeviewAdv.
You can refer to our WinForms TreeView feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms TreeView documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!