menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TextEditor - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TextEditor

    The TextEditor is used to provide interactive editing actions for text objects of TextNode in Diagram control.

    Inheritance
    System.Object
    TextEditor
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Windows.dll
    Syntax
    public class TextEditor : ITextEdit, IDisposable

    Constructors

    TextEditor(DiagramController)

    Initializes a new instance of the TextEditor class.

    Declaration
    public TextEditor(DiagramController controller)
    Parameters
    Type Name Description
    DiagramController controller

    The controller.

    Properties

    Bold

    Gets or sets a value indicating whether this TextEditor is bold.

    Declaration
    public bool Bold { get; set; }
    Property Value
    Type
    System.Boolean

    CharOffset

    Gets or sets the char offset.

    Declaration
    public int CharOffset { get; set; }
    Property Value
    Type Description
    System.Int32

    The char offset.

    Controller

    Gets the reference to diagram controller.

    Declaration
    protected DiagramController Controller { get; }
    Property Value
    Type Description
    DiagramController

    The controller.

    CurrentText

    Gets or sets the current text.

    Declaration
    public string CurrentText { get; set; }
    Property Value
    Type Description
    System.String

    The current text.

    FamilyName

    Gets or sets the name of the family.

    Declaration
    public string FamilyName { get; set; }
    Property Value
    Type Description
    System.String

    The name of the family.

    HorizontalAlignment

    Specifies how an object or text in a control is horizontally aligned relative to an element of the control.

    Declaration
    public StringAlignment HorizontalAlignment { get; set; }
    Property Value
    Type Description
    System.Drawing.StringAlignment

    The horizontal alignment.

    IsEditing

    Gets a value indicating whether this instance is editing.

    Declaration
    public bool IsEditing { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is editing; otherwise, false.

    Italic

    Gets or sets a value indicating whether this TextEditor is italic.

    Declaration
    public bool Italic { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if italic; otherwise, false.

    Lower

    Gets or sets a value indicating whether this TextEditor is lower.

    Declaration
    public bool Lower { get; set; }
    Property Value
    Type
    System.Boolean

    PointSize

    Gets or sets the size of the point.

    Declaration
    public float PointSize { get; set; }
    Property Value
    Type Description
    System.Single

    The size of the point.

    Strikeout

    Gets or sets a value that indicates whether this font specifies a horizontal line through the text in Diagram control.

    Declaration
    public bool Strikeout { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if strikeout; otherwise, false.

    Subscript

    Gets or sets a value indicating whether this TextEditor is subscript.

    Declaration
    public bool Subscript { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if subscript; otherwise, false.

    Superscript

    Gets or sets a value indicating whether this TextEditor is superscript.

    Declaration
    public bool Superscript { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if superscript; otherwise, false.

    Text

    Gets or sets the text.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    The text.

    TextColor

    Gets or sets a value that indicates to specify the color of the text in Diagram�s TextEditor.

    Declaration
    public Color TextColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    The color of the text.

    Underline

    Gets or sets a value indicating whether this TextEditor is underline.

    Declaration
    public bool Underline { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if underline; otherwise, false.

    Upper

    Gets or sets a value indicating whether this TextEditor is upper.

    Declaration
    public bool Upper { get; set; }
    Property Value
    Type
    System.Boolean

    Methods

    BeginEdit(Node, Boolean)

    Begins the edit.

    Declaration
    public void BeginEdit(Node nodeToEdit, bool bAutoResize)
    Parameters
    Type Name Description
    Node nodeToEdit

    The node to edit.

    System.Boolean bAutoResize

    if set to true automatic resize field.

    Dispose()

    Declaration
    public void Dispose()

    EndEdit(Boolean)

    Ends the edit.

    Declaration
    public void EndEdit(bool bSaveChanges)
    Parameters
    Type Name Description
    System.Boolean bSaveChanges

    if set to true save changes.

    GetSelectionFormat(Boolean)

    Gets selected nodes text formatting values.

    Declaration
    public SelectionFormat GetSelectionFormat(bool bFirstTexBaseInSelected)
    Parameters
    Type Name Description
    System.Boolean bFirstTexBaseInSelected

    Text in the selection base.

    Returns
    Type Description
    SelectionFormat

    SelectionFormat structure containing text formatting values

    Remarks

    Iterates through controller.SelectionList NodeCollection but only text nodes formatting values are taken into account.

    IsEditable(Node)

    Determines whether the specified node to edit is editable.

    Declaration
    public bool IsEditable(Node nodeToEdit)
    Parameters
    Type Name Description
    Node nodeToEdit

    The node to edit.

    Returns
    Type Description
    System.Boolean

    true if the specified node to edit is editable; otherwise, false.

    OnFormatChanged()

    Called when format changed.

    Declaration
    protected virtual void OnFormatChanged()

    SetSelection(Int32, Int32)

    Sets the selection.

    Declaration
    public void SetSelection(int nSelectionStart, int nSelectionLength)
    Parameters
    Type Name Description
    System.Int32 nSelectionStart

    The n selection start.

    System.Int32 nSelectionLength

    Length of the selection.

    StartEditing(Node, Boolean)

    Starts the editing.

    Declaration
    protected virtual ITextEditor StartEditing(Node nodeToEdit, bool bAutoResize)
    Parameters
    Type Name Description
    Node nodeToEdit

    The node to edit.

    System.Boolean bAutoResize

    if set to true automatic resize text field.

    Returns
    Type Description
    ITextEditor

    The text editor to edit.

    StartRTFNodeEdit(RichTextNode)

    Starts the RTF node edit.

    Declaration
    protected virtual ITextEditor StartRTFNodeEdit(RichTextNode nodeRTF)
    Parameters
    Type Name Description
    RichTextNode nodeRTF

    The RTF node.

    Returns
    Type Description
    ITextEditor

    The text editor to edit RTF.

    StartTextNodEdit(TextNode, Boolean)

    Starts the text node edit.

    Declaration
    protected virtual ITextEditor StartTextNodEdit(TextNode nodeText, bool bAutoResize)
    Parameters
    Type Name Description
    TextNode nodeText

    The node text.

    System.Boolean bAutoResize

    if set to true automatic resize text field.

    Returns
    Type Description
    ITextEditor

    The text editor to edit text node.

    Events

    FormatChanged

    Occurs when format changed.

    Declaration
    public event EventHandler FormatChanged
    Event Type
    Type
    System.EventHandler

    KeyDown

    Occurs when key down.

    Declaration
    public event KeyEventHandler KeyDown
    Event Type
    Type
    System.Windows.Forms.KeyEventHandler

    TextChanged

    Occurs when text changed.

    Declaration
    public event EventHandler TextChanged
    Event Type
    Type
    System.EventHandler

    TextEditingCompleted

    Occurs when text editing completed.

    Declaration
    public event LabelEditingCompletedEventHandler TextEditingCompleted
    Event Type
    Type
    LabelEditingCompletedEventHandler

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved