Class RichTextTool
The rich text tool is used for drawing graphical representation object of an interactive tool for inserting and editing rich text shape in Diagram control.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public class RichTextTool : RectangleToolBase, IDisposable
Remarks
This tool manages the insertion of new rich text nodes into a diagram and editing of existing rich 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 rich 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 rich text node, this tool opens a text editor allowing the user to edit the text.
Tool RectangleToolBase RichTextNodeConstructors
RichTextTool(DiagramController)
Initializes a new instance of the RichTextTool class.
Declaration
public RichTextTool(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 ( start TextEditor after Text node is inserted into document for example )
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 rich text node. |