Class TextTool
Interactive tool for inserting text nodes into a diagram and editing existing text nodes.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public class TextTool : RectangleToolBase, IDisposable
Remarks
This tool manages the insertion of new text nodes into a diagram and editing of existing text nodes. Activating this tool causes it to track mouse down, mouse move, and mouse up events and draw a tracking rectangle. The rectangle drawn is used as the bounds of a new text node, which is inserted into the diagram using an InsertNodesCmd.
This tool also listens for double-click events. If the user double clicks on a text node, this tool opens a text editor allowing the user to edit the text.
Tool TextNodeConstructors
TextTool(DiagramController)
Initializes a new instance of the TextTool class.
Declaration
public TextTool(DiagramController controller)
Parameters
Type | Name | Description |
---|---|---|
DiagramController | controller | The controller. |
Properties
DefaultText
Gets or sets default text value assigned to new text nodes created by this tool.
Declaration
public string DefaultText { get; set; }
Property Value
Type |
---|
System.String |
Methods
ActionComplete(Node)
Method used to perform additional actions after node is inserted into document
Declaration
protected override void ActionComplete(Node nodeInserted)
Parameters
Type | Name | Description |
---|---|---|
Node | nodeInserted | node inserted into document |
Overrides
CreateNode(RectangleF)
Creates the node from given rectangle base.
Declaration
protected override Node CreateNode(RectangleF rectBounding)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rectBounding | The bounding rectangle. |
Returns
Type | Description |
---|---|
Node | The rectangle node. |