Articles in this section

Can I display ToolTips for my symbols?

 

Display tooltip for symbols

ToolTips can be displayed using the Model's "NodeMouseEnter" and "NodeMouseLeave" events. Here is a code snippet where ToolTips are displayed only for the Diagram's nodes.

[C#]

private void EventSink_NodeMouseEnter(object sender, NodeMouseEventArgs evtArgs) 
{
    if (evtArgs.Node.GetType() == typeof(MySymbol))
    {
        this.toolTip1.SetToolTip(this.diagram1, evtArgs.Node.Name.ToString());
        this.toolTip1.Active = true;
    }
}
private void EventSink_NodeMouseLeave(object sender, NodeMouseEventArgs evtArgs)
{                                                             
    this.toolTip1.Active = false;                       
}

[VB.NET]

Private Sub EventSink_NodeMouseEnter(ByVal sender As Object, ByVal evtArgs As NodeMouseEventArgs)  
    If evtArgs.Node.Name.StartsWith("MySymbol") Then 
        Me.toolTip1.SetToolTip(Me.diagram1, evtArgs.Node.Name.ToString()) 
        Me.toolTip1.Active = True 
    End If
End Sub
Private Sub EventSink_NodeMouseLeave(ByVal sender As Object, ByVal evtArgs As NodeMouseEventArgs) 
    Me.toolTip1.Active = False
End Sub

 

Here is a Sample for displaying ToolTips :

Sample

Conclusion

I hope you enjoyed learning about how to display ToolTips for symbols.

You can refer to the WinForms Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinForms Diagram example 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 forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied