reckfellENGINE

TextEdit

Multiline text editor with selection, multiple carets and undo history.

On this page
class TextEditReckfellSharpInherits Control

TextEdit edits multiline text in the UI. The application implements file loading, saving and validation. After creation, add the control to the UI and configure its size. Even an empty document contains one logical line.

Assign Text to load a document. The setter emits TextSet rather than TextChanged and, with normal undo history enabled, allows the replacement to be undone. For a new document, explicitly call ClearUndoHistory and TagSavedVersion after loading. Do not clear history on every model synchronization: that removes the user’s ability to undo.

Connect TextChanged and read Text to track edits. Notifications are deferred; several synchronous edits can coalesce into one signal. TextSet reports whole-text assignment or Clear rather than individual keystrokes. Explicitly update the model when loading.

Lines and columns start at 0. Columns count Unicode code points rather than C# UTF-16 char values: a supplementary character occupies one column while String.Length counts two code units. A code point is not always one visible character either. Convert C# string indices before passing them as columns.

InsertTextAtCaret replaces selection; by default it targets all eligible carets, while caretIndex = 0 selects the main caret. RemoveText uses an exclusive end boundary. Group related edits with BeginComplexOperation/EndComplexOperation in try/finally so one command can be undone with one Undo.

Editable false limits user editing and Undo/Redo, but not programmatic setters or insertion. Compare GetVersion with GetSavedVersion to track unsaved changes. Call TagSavedVersion after the application successfully saves: the method does not write a file. Explicitly restore the saved marker after clearing history.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

TextEditConstructor
# TextEdit
C#
public TextEdit();

Creates an editable empty control with one logical line and empty undo history. Configure UI attachment and size separately.

Properties48

AutowrapModeProperty
# AutowrapMode
C#
public TextServer.AutowrapMode AutowrapMode { get; set; }

Visual wrapping rule with WrapMode.Boundary: Arbitrary uses grapheme boundaries, Word uses words, WordSmart can split an oversized word, and Off disables soft wrapping. Does not enable Boundary by itself.

BackspaceDeletesCompositeCharacterEnabledProperty
# BackspaceDeletesCompositeCharacterEnabled
C#
public bool BackspaceDeletesCompositeCharacterEnabled { get; set; }

With true, normal Backspace deletes to the previous composite-character boundary; false deletes one code point. CaretMidGrapheme true takes priority and also selects one-code-point deletion. Does not control RemoveText with an explicit range.

CaretBlinkProperty
# CaretBlink
C#
public bool CaretBlink { get; set; }

Enables text-caret blinking. The timer runs while focused; false disables blinking rather than hiding the caret. Visibility still depends on focus and other drawing conditions. Configure timing with CaretBlinkInterval.

CaretBlinkIntervalProperty
# CaretBlinkInterval
C#
public float CaretBlinkInterval { get; set; }

Positive caret-visibility toggle interval in seconds. For example, 0.5 toggles every half second; a complete visible/hidden cycle takes two intervals. Zero does not disable blinking: use CaretBlink false. This is not a key-repeat delay.

CaretDrawWhenEditableDisabledProperty
# CaretDrawWhenEditableDisabled
C#
public bool CaretDrawWhenEditableDisabled { get; set; }

Allows caret drawing with Editable false, subject to the remaining visibility conditions. Does not allow input or make the control editable. Leave false for ordinary text viewing without a caret.

CaretMidGraphemeProperty
# CaretMidGrapheme
C#
public bool CaretMidGrapheme { get; set; }

Allows caret/deletion behavior inside composite characters. With true, Backspace deletes one code point even if BackspaceDeletesCompositeCharacterEnabled is enabled. Does not mean operating on halves of a UTF-16 surrogate pair.

CaretMoveOnRightClickProperty
# CaretMoveOnRightClick
C#
public bool CaretMoveOnRightClick { get; set; }

Allows moving the caret by right-clicking. Assigning this property does not move it or enable the context menu; configure ContextMenuEnabled separately.

CaretMultipleProperty
# CaretMultiple
C#
public bool CaretMultiple { get; set; }

Allows multiple carets. false immediately removes secondary carets, resets multicaret-edit state and blocks AddCaret. Do not toggle this setting inside BeginMulticaretEdit/EndMulticaretEdit.

CaretTypeProperty
# CaretType
C#
public TextEdit.CaretTypeEnum CaretType { get; set; }

Text-caret shape: Line or Block. Block changes drawing but does not enable character replacement: configure OvertypeMode separately. Does not change text or caret positions.

ContextMenuEnabledProperty
# ContextMenuEnabled
C#
public bool ContextMenuEnabled { get; set; }

Allows the user to open the built-in context menu. false neither deletes the PopupMenu nor prevents programmatic GetMenu or MenuOption calls. This is an interface setting, not an editing restriction; use Editable to control input.

CustomWordSeparatorsProperty
# CustomWordSeparators
C#
public string CustomWordSeparators { get; set; }

Additional word-separator characters for the editor’s text system. Assigning the string does not enable them; use UseCustomWordSeparators. Not a regex and does not change the fixed WholeWords boundary checks in Search.

DeselectOnFocusLossEnabledProperty
# DeselectOnFocusLossEnabled
C#
public bool DeselectOnFocusLossEnabled { get; set; }

Controls deselection on focus loss. false retains selection when another control receives focus. Switching false to true while this editor is unfocused immediately clears an existing selection. Does not edit text or transfer focus.

DragAndDropSelectionEnabledProperty
# DragAndDropSelectionEnabled
C#
public bool DragAndDropSelectionEnabled { get; set; }

Allows the user to drag selected text through TextEdit’s drag-and-drop handling. Does not create a selection, perform a transfer on assignment or automatically enable file/project-object drops. Selection separately requires SelectingEnabled.

DrawControlCharsProperty
# DrawControlChars
C#
public bool DrawControlChars { get; set; }

Allows the text system to display control characters. Does not remove them from the document or sanitize/validate input text.

DrawSpacesProperty
# DrawSpaces
C#
public bool DrawSpaces { get; set; }

Shows space markers without changing Text or selection rules. Presentation rather than adding characters to a file.

DrawTabsProperty
# DrawTabs
C#
public bool DrawTabs { get; set; }

Shows visual tab markers while retaining document text. Does not enable Tab input or convert tabs into spaces.

EditableProperty
# Editable
C#
public bool Editable { get; set; }

Allows user editing; default true. false also blocks Undo/Redo actions, but not programmatic Text, SetLine, InsertTextAtCaret or RemoveText. This is a UI mode rather than model-data protection.

EmojiMenuEnabledProperty
# EmojiMenuEnabled
C#
public bool EmojiMenuEnabled { get; set; }

Allows the context-menu emoji command when the platform supports a system picker. false disables the corresponding item rather than necessarily removing it. Editable is also required. Does not add an emoji font or guarantee a system picker on every platform.

EmptySelectionClipboardEnabledProperty
# EmptySelectionClipboardEnabled
C#
public bool EmptySelectionClipboardEnabled { get; set; }

Allows default Copy and Cut to operate on full lines when no text is selected. Defaults to true. Does not mean copying an empty string: it copies the entire caret line, which Cut may remove. Does not affect selected-text handling; assigning the property does not access the clipboard.

HighlightAllOccurrencesProperty
# HighlightAllOccurrences
C#
public bool HighlightAllOccurrences { get; set; }

Highlights case-sensitive whole-word matches of caret 0’s selected text. Empty or whitespace-only selections are ignored. Creates no additional selections and does not set SetSearchText. Differs from AddSelectionForNextOccurrence, which allows substring matches.

HighlightCurrentLineProperty
# HighlightCurrentLine
C#
public bool HighlightCurrentLine { get; set; }

Highlights the background of current caret lines using the theme color. This is visual highlighting rather than text selection: HasSelection and GetSelectedText are unchanged. Use Select for an explicit range.

IndentWrappedLinesProperty
# IndentWrappedLines
C#
public bool IndentWrappedLines { get; set; }

Adds visual indentation to wrapped continuations. Does not insert spaces/tabs or change text or logical line numbers.

LanguageProperty
# Language
C#
public string Language { get; set; }

Text-shaping language hint, such as ar; an empty string uses the locale. Does not translate the document or switch application language. Changes shaping/glyph selection while retaining Text.

MiddleMousePasteEnabledProperty
# MiddleMousePasteEnabled
C#
public bool MiddleMousePasteEnabled { get; set; }

Allows middle-mouse paste through the primary-selection clipboard on supporting platforms. Does not add primary-clipboard support or control ordinary Paste. false disables this input path but does not block programmatic PastePrimaryClipboard. Assigning the property inserts nothing.

MinimapDrawProperty
# MinimapDraw
C#
public bool MinimapDraw { get; set; }

Shows the document minimap. It takes part of TextEdit’s width, so enabling it can change the number of display rows when wrapping is enabled. Source Text and logical line count remain unchanged. Set its width with MinimapWidth.

MinimapWidthProperty
# MinimapWidth
C#
public int MinimapWidth { get; set; }

Minimap area width in control pixels. Use a nonnegative value that leaves room for the main text. This is not a minimap font scale. Changing it recalculates available wrap width; use MinimapDraw false to disable the minimap.

PlaceholderTextProperty
# PlaceholderText
C#
public string PlaceholderText { get; set; }

Empty-editor hint, separate from Text. GetPlaceholder returns the source string; presentation uses UI translation. Not part of document saving, searching or content history.

ScrollFitContentHeightProperty
# ScrollFitContentHeight
C#
public bool ScrollFitContentHeight { get; set; }

Include content in the control’s minimum height. A parent container can expand the editor instead of using internal scrolling. Does not change font size or add lines.

ScrollFitContentWidthProperty
# ScrollFitContentWidth
C#
public bool ScrollFitContentWidth { get; set; }

Include content in the control’s minimum width. A layout requirement rather than fixed width or text zoom; account for interaction with wrapping.

ScrollHorizontalProperty
# ScrollHorizontal
C#
public int ScrollHorizontal { get; set; }

Horizontal offset in pixels. Clamped to the internal scrollbar range; wrapping can eliminate the available horizontal range. Not a text column number.

ScrollPastEndOfFileProperty
# ScrollPastEndOfFile
C#
public bool ScrollPastEndOfFile { get; set; }

Allows extra scrolling space beyond text end. Does not add empty document lines or increase GetLineCount.

ScrollSmoothProperty
# ScrollSmooth
C#
public bool ScrollSmooth { get; set; }

Enables smooth vertical scrolling. Does not change ScrollVertical units or guarantee animation for every programmatic SetVScroll.

ScrollVScrollSpeedProperty
# ScrollVScrollSpeed
C#
public float ScrollVScrollSpeed { get; set; }

Smooth vertical scrolling speed, at least 1. Does not set the current offset or represent line height or a horizontal step size.

ScrollVerticalProperty
# ScrollVertical
C#
public double ScrollVertical { get; set; }

Vertical offset in visual-row units, allowing a fractional part. Not pixels or always a logical line number: use GetScrollPosForLine with wrapping. The getter returns the actual clamped value.

SelectingEnabledProperty
# SelectingEnabled
C#
public bool SelectingEnabled { get; set; }

Allows text selection. Disabling clears existing selections but does not block caret movement through Select or make the document read-only. Configure Editable separately.

SelectionHandleEnabledProperty
# SelectionHandleEnabled
C#
public bool SelectionHandleEnabled { get; set; }

Enables on-screen selection handles for touch input. Does not enable selection itself; configure SelectingEnabled separately. Does not control the number of carets or replace CaretMultiple.

ShortcutKeysEnabledProperty
# ShortcutKeysEnabled
C#
public bool ShortcutKeysEnabled { get; set; }

Enables built-in editing-command shortcuts and their context-menu accelerator labels. Does not disable all keyboard input or block programmatic commands. Use Editable false to prevent user text editing.

StructuredTextBidiOverrideProperty
# StructuredTextBidiOverride
C#
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }

Structured-text parser for mixed LTR/RTL: URI, path, email, list and other supported modes. Controls separator presentation rather than converting document encoding. Configure parser options separately.

StructuredTextBidiOverrideOptionsProperty
# StructuredTextBidiOverrideOptions
C#
public Reckfell.Collections.Array StructuredTextBidiOverrideOptions { get; set; }

Shared Array of BiDi parser options. The setter compares contents and skips equal values; merely assigning Duplicate with old contents does not detach the previous array. In-place mutation does not trigger text recalculation. Supply a separately prepared array and a new array with changed contents when updating.

SyntaxHighlighterProperty
# SyntaxHighlighter
C#
public SyntaxHighlighter SyntaxHighlighter { get; set; }

This editor’s highlighting resource; null disables highlighting. Use one instance per TextEdit because the resource stores only one context. Reassigning the same resource is skipped and does not replace ClearHighlightingCache/EmitChanged.

TabInputModeProperty
# TabInputMode
C#
public bool TabInputMode { get; set; }

Controls editor handling of the Tab key. Does not convert existing tab characters, set their width or automatically translate indentation to spaces.

TextProperty
# Text
C#
public string Text { get; set; }

Full text with \n line separators. Assignment replaces the document, emits TextSet without TextChanged and allows Undo with history enabled. For a newly loaded document, explicitly clear history and mark the saved version afterward.

TextDirectionProperty
# TextDirection
C#
public Control.TextDirection TextDirection { get; set; }

Base text direction: Inherited follows Control layout, Auto derives it from text, and Ltr/Rtl set it explicitly. Does not translate or reverse stored Text. Document character order remains logical.

UseCustomWordSeparatorsProperty
# UseCustomWordSeparators
C#
public bool UseCustomWordSeparators { get; set; }

Enables CustomWordSeparators for word-boundary processing. Independent of UseDefaultWordSeparators; both sets can be used together. Does not switch Search into WholeWords mode.

UseDefaultWordSeparatorsProperty
# UseDefaultWordSeparators
C#
public bool UseDefaultWordSeparators { get; set; }

Enables the text system’s default word separators. Disabling does not enable custom separators automatically; configure UseCustomWordSeparators separately. Does not change Search WholeWords boundary checks.

VirtualKeyboardEnabledProperty
# VirtualKeyboardEnabled
C#
public bool VirtualKeyboardEnabled { get; set; }

Allows the on-screen keyboard when supported by the current platform. Assigning true does not itself open it. VirtualKeyboardShowOnFocus separately controls opening on focus; editing requires Editable. Does not build a custom keyboard from UI controls.

VirtualKeyboardShowOnFocusProperty
# VirtualKeyboardShowOnFocus
C#
public bool VirtualKeyboardShowOnFocus { get; set; }

Allows requesting the on-screen keyboard on focus. Requires VirtualKeyboardEnabled, Editable and platform support. false disables focus-triggered opening rather than every other keyboard-opening path.

WrapModeProperty
# WrapMode
C#
public TextEdit.LineWrappingMode WrapMode { get; set; }

None disables visual wrapping; Boundary constrains lines to available control width. AutowrapMode chooses break points. Does not insert line separators or change GetLineCount; gutters, scrollbar, theme and minimap also affect available width.

Methods259

AddCaretint
# AddCaret
C#
public int AddCaret(int line, int column);

Adds a caret and returns its index; -1 when CaretMultiple is disabled or the position overlaps an existing caret/selection outside a multicaret edit. Position is clamped to the document. Inside BeginMulticaretEdit, a new caret is temporarily ignored by the current operation until EndMulticaretEdit.

Parameters
NameTypeDefault
lineint—
columnint—
line

Zero-based logical line.

column

Column in Unicode code points rather than a UTF-16 index.

Returns int

Adds a caret and returns its index; -1 when CaretMultiple is disabled or the position overlaps an existing caret/selection outside a multicaret edit. Position is clamped to the document. Inside BeginMulticaretEdit, a new caret is temporarily ignored by the current operation until EndMulticaretEdit.

AddCaretAtCaretsvoid
# AddCaretAtCarets
C#
public void AddCaretAtCarets(bool below);

Adds a caret one visible display row above or below each original caret, preserving the visual horizontal position and corresponding selection span. Requires CaretMultiple. With wrapping, the target may be another part of the same logical line; hidden lines are skipped. No caret is added beyond document edges; duplicate positions are merged.

Parameters
NameTypeDefault
belowbool—
below

true adds one visible row below; false adds above.

AddGuttervoid
# AddGutter
C#
public void AddGutter(int at = -1);

Adds a field beside the text and cells for every logical line. at within 0…Count inserts at that index; a negative value or one above Count appends. Later gutter indices shift. A new gutter is String, width 24, drawn, non-clickable and non-overwritable. Emits GutterAdded without an index.

Parameters
NameTypeDefault
atint-1
at

Insertion index 0…GetGutterCount; negative values or values above Count append.

AddSelectionForNextOccurrencevoid
# AddSelectionForNextOccurrence
C#
public void AddSelectionForNextOccurrence();

Adds a selection for the next literal match of the last indexed caret’s selection. Requires SelectingEnabled and CaretMultiple. With no selection, the first call only selects the word. Search is case-sensitive, allows substrings and wraps; multiline queries are unsupported. Matches may overlap, so merging need not increase the caret count. Does not edit text.

AdjustCaretsAfterEditvoid · Deprecated
# AdjustCaretsAfterEdit
C#
public void AdjustCaretsAfterEdit(int caret, int fromLine, int fromCol, int toLine, int toCol);

Obsolete no-op. Current edit operations adjust carets themselves; remove this call from new code.

Parameters
NameTypeDefault
caretint—
fromLineint—
fromColint—
toLineint—
toColint—
caret

Current caret index rather than a persistent identifier.

fromLine

Unused by the obsolete method.

fromCol

Unused by the obsolete method.

toLine

Unused by the obsolete method.

toCol

Unused by the obsolete method.

AdjustViewportToCaretvoid
# AdjustViewportToCaret
C#
public void AdjustViewportToCaret(int caretIndex = 0);

Scrolls the viewport to reveal the specified caret without moving it. Use current layout after text/size changes. Explicitly choose the intended index in multicaret mode.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current index of one caret; 0 is the main caret.

ApplyImevoid
# ApplyIme
C#
public void ApplyIme();

Applies the current IME composition through the insertion path and closes it. Does not save a document file. Invoke from a coordinated editable context rather than using it for ordinary programmatic string insertion.

Backspacevoid
# Backspace
C#
public void Backspace(int caretIndex = -1);

Runs deletion before the caret. The default implementation requires Editable; joins lines at line start and does nothing at document start. If the target set contains a selection, deletes selections without deleting characters at other unselected carets. Defaults to all eligible carets. An overridden _Backspace completely replaces the default path.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Caret index; Backspace uses -1 for the entire eligible set.

BeginComplexOperationvoid
# BeginComplexOperation
C#
public void BeginComplexOperation();

Begins an edit group for one Undo. Supports nested groups; balance each Begin with EndComplexOperation in finally. Not a model transaction and does not defer all signals until the group ends.

BeginMulticaretEditvoid
# BeginMulticaretEdit
C#
public void BeginMulticaretEdit();

Begins a multicaret-processing scope: merging is deferred and new carets can be marked ignored. End with EndMulticaretEdit in finally; scopes can nest. Use BeginComplexOperation separately for Undo grouping: these are different mechanisms.

CancelImevoid
# CancelIme
C#
public void CancelIme();

Cancels unfinished IME composition and updates its presentation. Does not revert committed Text or replace Undo for previous edits.

CenterViewportToCaretvoid
# CenterViewportToCaret
C#
public void CenterViewportToCaret(int caretIndex = 0);

Centers the viewport around the specified caret within scroll limits. Does not create a selection or move the caret.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current index of one caret; 0 is the main caret.

Clearvoid
# Clear
C#
public void Clear();

Clears text and emits TextSet. An empty document retains one line. With Editable true and history enabled, the operation is undoable; with Editable false it clears history. Distinct from ClearUndoHistory, which retains text.

ClearUndoHistoryvoid
# ClearUndoHistory
C#
public void ClearUndoHistory();

Removes Undo/Redo while retaining current text. Also resets the GetSavedVersion marker. Retag with TagSavedVersion after loading if needed; clearing history does not save anything to disk.

CollapseCaretsvoid
# CollapseCarets
C#
public void CollapseCarets(int fromLine, int fromColumn, int toLine, int toColumn, bool inclusive = false);

Moves carets and affected selection boundaries inside the range to the original fromLine/fromColumn position. Reversed bounds are normalized for membership, but the target remains the original from position. inclusive includes both edges; both are excluded by default. Fully contained selections are cleared, partial selections shortened, and duplicate carets merged. Merging can be deferred inside a multicaret-edit scope. Text and Undo history are unchanged.

Parameters
NameTypeDefault
fromLineint—
fromColumnint—
toLineint—
toColumnint—
inclusiveboolfalse
fromLine

Original logical target line and first range boundary.

fromColumn

Original target column in Unicode code points; remains the target for a reversed range.

toLine

Logical line of the second range boundary.

toColumn

Second boundary column in Unicode code points.

inclusive

Include both range edges; false excludes both.

Copyvoid
# Copy
C#
public void Copy(int caretIndex = -1);

The default implementation copies selected text to the system clipboard without editing the document. With caretIndex -1, selections are joined by newlines in document order. Without a selection, EmptySelectionClipboardEnabled permits copying full lines with a trailing newline; multiple carets on one line do not duplicate it. With that setting disabled and no selection, leaves the clipboard unchanged. Works with Editable false. Overriding _Copy replaces this behavior.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Existing caret index; -1 means all.

Cutvoid
# Cut
C#
public void Cut(int caretIndex = -1);

The default implementation first copies text, then, when Editable, removes selections or full lines if EmptySelectionClipboardEnabled allows it. With Editable false, the document is unchanged but copying can still occur. Undo restores the document, not the previous system clipboard. Cut’s internal copying does not call a custom _Copy; override _Cut to replace the whole action.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Existing caret index; -1 means all.

DeleteSelectionvoid
# DeleteSelection
C#
public void DeleteSelection(int caretIndex = -1);

Deletes selected text and collapses affected selections. By default, processes all eligible carets and groups deletion into one Undo step. A specific caretIndex limits the operation to one caret. Programmatic calls work independently of Editable.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Deselectvoid
# Deselect
C#
public void Deselect(int caretIndex = -1);

Clears selection while retaining caret positions and text. caretIndex -1 affects all carets; a specific index affects one. Does not remove secondary carets.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

EndActionvoid
# EndAction
C#
public void EndAction();

Marks a boundary in the current StartAction action; not Undo, rollback or an immediate text reset. Group completion can be processed with the next action. Use StartAction with another type or None to switch groups explicitly.

EndComplexOperationvoid
# EndComplexOperation
C#
public void EndComplexOperation();

Closes one undo-group level. A completed outer group combines nested changes into one history step. Call in finally for its matching BeginComplexOperation.

EndMulticaretEditvoid
# EndMulticaretEdit
C#
public void EndMulticaretEdit();

Closes a multicaret-edit level. Leaving the outer scope performs pending merges and clears ignored indices. Does not replace EndComplexOperation for Undo history.

GetAutowrapModeTextServer.AutowrapMode
# GetAutowrapMode
C#
public TextServer.AutowrapMode GetAutowrapMode();

Visual wrapping rule with WrapMode.Boundary: Arbitrary uses grapheme boundaries, Word uses words, WordSmart can split an oversized word, and Off disables soft wrapping. Does not enable Boundary by itself.

Returns TextServer.AutowrapMode

Visual wrapping rule with WrapMode.Boundary: Arbitrary uses grapheme boundaries, Word uses words, WordSmart can split an oversized word, and Off disables soft wrapping. Does not enable Boundary by itself.

GetCaretBlinkIntervalfloat
# GetCaretBlinkInterval
C#
public float GetCaretBlinkInterval();

Positive caret-visibility toggle interval in seconds. For example, 0.5 toggles every half second; a complete visible/hidden cycle takes two intervals. Zero does not disable blinking: use CaretBlink false. This is not a key-repeat delay.

Returns float

Positive caret-visibility toggle interval in seconds. For example, 0.5 toggles every half second; a complete visible/hidden cycle takes two intervals. Zero does not disable blinking: use CaretBlink false. This is not a key-repeat delay.

GetCaretColumnint
# GetCaretColumn
C#
public int GetCaretColumn(int caretIndex = 0);

Active endpoint column in Unicode code points. Not a pixel position, UTF-16 index or guaranteed boundary of one visible character.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Active endpoint column in Unicode code points. Not a pixel position, UTF-16 index or guaranteed boundary of one visible character.

GetCaretCountint
# GetCaretCount
C#
public int GetCaretCount();

Number of user carets, at least 1. Excludes the temporary drag caret. Indices apply only to the current set and can change after merging/removal.

Returns int

Number of user carets, at least 1. Excludes the temporary drag caret. Indices apply only to the current set and can change after merging/removal.

GetCaretDrawPosVector2
# GetCaretDrawPos
C#
public Vector2 GetCaretDrawPos(int caretIndex = 0);

Last computed local caret drawing position. Depends on the current frame/layout; use GetCaretLine/GetCaretColumn to retain a document position.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current index of one caret; 0 is the main caret.

Returns Vector2

Last computed local caret drawing position. Depends on the current frame/layout; use GetCaretLine/GetCaretColumn to retain a document position.

GetCaretIndexEditOrderint[] · Deprecated
# GetCaretIndexEditOrder
C#
public int[] GetCaretIndexEditOrder();

Obsolete reverse index order. Current editing APIs adjust carets themselves; use GetSortedCarets when sorting is needed rather than relying on the old manual-edit order.

Returns int[]

Obsolete reverse index order. Current editing APIs adjust carets themselves; use GetSortedCarets when sorting is needed rather than relying on the old manual-edit order.

GetCaretLineint
# GetCaretLine
C#
public int GetCaretLine(int caretIndex = 0);

Logical line of the specified caret’s active endpoint, not the anchor line or visual wrap index.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Logical line of the specified caret’s active endpoint, not the anchor line or visual wrap index.

GetCaretTypeTextEdit.CaretTypeEnum
# GetCaretType
C#
public TextEdit.CaretTypeEnum GetCaretType();

Text-caret shape: Line or Block. Block changes drawing but does not enable character replacement: configure OvertypeMode separately. Does not change text or caret positions.

Returns TextEdit.CaretTypeEnum

Text-caret shape: Line or Block. Block changes drawing but does not enable character replacement: configure OvertypeMode separately. Does not change text or caret positions.

GetCaretWrapIndexint
# GetCaretWrapIndex
C#
public int GetCaretWrapIndex(int caretIndex = 0);

Visual segment of the current logical line containing the specified caret. Does not change the caret index or document line.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current index of one caret; 0 is the main caret.

Returns int

Visual segment of the current logical line containing the specified caret. Does not change the caret index or document line.

GetCustomWordSeparatorsstring
# GetCustomWordSeparators
C#
public string GetCustomWordSeparators();

Additional word-separator characters for the editor’s text system. Assigning the string does not enable them; use UseCustomWordSeparators. Not a regex and does not change the fixed WholeWords boundary checks in Search.

Returns string

Additional word-separator characters for the editor’s text system. Assigning the string does not enable them; use UseCustomWordSeparators. Not a regex and does not change the fixed WholeWords boundary checks in Search.

GetDrawControlCharsbool
# GetDrawControlChars
C#
public bool GetDrawControlChars();

Allows the text system to display control characters. Does not remove them from the document or sanitize/validate input text.

Returns bool

Allows the text system to display control characters. Does not remove them from the document or sanitize/validate input text.

GetFirstNonWhiteSpaceColumnint
# GetFirstNonWhiteSpaceColumn
C#
public int GetFirstNonWhiteSpaceColumn(int line);

Unicode code-point column of the first non-whitespace character. A tab occupies one column even when its visual indentation is wider. For an all-whitespace line, returns its length.

Parameters
NameTypeDefault
lineint—
line

Logical-line index from 0 through GetLineCount() - 1.

Returns int

Unicode code-point column of the first non-whitespace character. A tab occupies one column even when its visual indentation is wider. For an all-whitespace line, returns its length.

GetFirstVisibleLineint
# GetFirstVisibleLine
C#
public int GetFirstVisibleLine();

Logical line number at the top of the viewport. When scrolled into a long line, its first visual segment can already be above the viewport; does not return a wrapIndex.

Returns int

Logical line number at the top of the viewport. When scrolled into a long line, its first visual segment can already be above the viewport; does not return a wrapIndex.

GetGutterCountint
# GetGutterCount
C#
public int GetGutterCount();

Number of gutter definitions, including hidden ones. Use this count to test for no gutters rather than comparing GetTotalGutterWidth with zero.

Returns int

Number of gutter definitions, including hidden ones. Use this count to test for no gutters rather than comparing GetTotalGutterWidth with zero.

GetGutterNamestring
# GetGutterName
C#
public string GetGutterName(int gutter);

Stored gutter-definition name rather than a per-line label or guaranteed unique ID.

Parameters
NameTypeDefault
gutterint—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns string

Stored gutter-definition name rather than a per-line label or guaranteed unique ID.

GetGutterTypeTextEdit.GutterType
# GetGutterType
C#
public TextEdit.GutterType GetGutterType(int gutter);

Gutter presentation mode, default String. Does not report whether individual line data is populated.

Parameters
NameTypeDefault
gutterint—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns TextEdit.GutterType

Gutter presentation mode, default String. Does not report whether individual line data is populated.

GetGutterWidthint
# GetGutterWidth
C#
public int GetGutterWidth(int gutter);

Stored width of one gutter, excluding shared padding. Hiding the gutter does not reset it.

Parameters
NameTypeDefault
gutterint—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns int

Stored width of one gutter, excluding shared padding. Hiding the gutter does not reset it.

GetHScrollint
# GetHScroll
C#
public int GetHScroll();

Horizontal offset in pixels. Clamped to the internal scrollbar range; wrapping can eliminate the available horizontal range. Not a text column number.

Returns int

Horizontal offset in pixels. Clamped to the internal scrollbar range; wrapping can eliminate the available horizontal range. Not a text column number.

GetHScrollBarHScrollBar
# GetHScrollBar
C#
public HScrollBar GetHScrollBar();

Internal HScrollBar owned by TextEdit. Do not free or reparent it separately; freeing the editor frees the scrollbar. Use ScrollHorizontal for ordinary scrolling.

Returns HScrollBar

Internal HScrollBar owned by TextEdit. Do not free or reparent it separately; freeing the editor frees the scrollbar. Use ScrollHorizontal for ordinary scrolling.

GetIndentLevelint
# GetIndentLevel
C#
public int GetIndentLevel(int line);

Leading indentation amount: tab count multiplied by GetTabSize plus leading spaces. Not the first-content column or a syntax-tree nesting level.

Parameters
NameTypeDefault
lineint—
line

Logical-line index from 0 through GetLineCount() - 1.

Returns int

Leading indentation amount: tab count multiplied by GetTabSize plus leading spaces. Not the first-content column or a syntax-tree nesting level.

GetLanguagestring
# GetLanguage
C#
public string GetLanguage();

Text-shaping language hint, such as ar; an empty string uses the locale. Does not translate the document or switch application language. Changes shaping/glyph selection while retaining Text.

Returns string

Text-shaping language hint, such as ar; an empty string uses the locale. Does not translate the document or switch application language. Changes shaping/glyph selection while retaining Text.

GetLastFullVisibleLineint
# GetLastFullVisibleLine
C#
public int GetLastFullVisibleLine();

Logical line number of the bottom fully fitting visual row. Also read GetLastFullVisibleLineWrapIndex to distinguish segments of a wrapped line.

Returns int

Logical line number of the bottom fully fitting visual row. Also read GetLastFullVisibleLineWrapIndex to distinguish segments of a wrapped line.

GetLastFullVisibleLineWrapIndexint
# GetLastFullVisibleLineWrapIndex
C#
public int GetLastFullVisibleLineWrapIndex();

Index of the bottom fully fitting visual segment within GetLastFullVisibleLine. Not a standalone document line number.

Returns int

Index of the bottom fully fitting visual segment within GetLastFullVisibleLine. Not a standalone document line number.

GetLastUnhiddenLineint
# GetLastUnhiddenLine
C#
public int GetLastUnhiddenLine();

Returns the last logical line index not hidden by a derived editor’s folding system. In ordinary TextEdit without hiding, this is GetLineCount() - 1. Does not mean the last line in the current scrolled viewport; use viewport methods for that. An empty document has line 0.

Returns int

Returns the last logical line index not hidden by a derived editor’s folding system. In ordinary TextEdit without hiding, this is GetLineCount() - 1. Does not mean the last line in the current scrolled viewport; use viewport methods for that. An empty document has line 0.

GetLinestring
# GetLine
C#
public string GetLine(int line);

Logical-line text without the \n separator. Indices start at 0. An invalid index returns an empty string, so check GetLineCount first when an error must be distinguished from an empty document line.

Parameters
NameTypeDefault
lineint—
line

Logical-line index from 0 through GetLineCount() - 1.

Returns string

Logical-line text without the \n separator. Indices start at 0. An invalid index returns an empty string, so check GetLineCount first when an error must be distinguished from an empty document line.

GetLineBackgroundColorColor
# GetLineBackgroundColor
C#
public Color GetLineBackgroundColor(int line);

Stored additional logical-line background rather than the final color including theme and selection.

Parameters
NameTypeDefault
lineint—
line

Logical-line index from 0 through GetLineCount() - 1.

Returns Color

Stored additional logical-line background rather than the final color including theme and selection.

GetLineColumnAtPos2 overloads
# GetLineColumnAtPos · 1/2
C#
public Vector2I GetLineColumnAtPos(Vector2I position, bool allowOutOfBounds);

Converts a TextEdit-local position to Vector2I: X is a Unicode code-point column and Y a logical line. clampLine/clampColumn control text-layout clamping; an unavailable position can return (-1, -1). Not a universal control hit-test: check the local control area first. The old overload’s allowOutOfBounds actually forwards as clampLine with clampColumn always true. Prefer the three-argument overload for clarity.

Parameters
NameTypeDefault
positionVector2I—
allowOutOfBoundsbool—
position

Control-local pixel position rather than screen coordinates.

allowOutOfBounds

Historical name: actually clampLine; this overload always sets clampColumn true.

Returns Vector2I

Converts a TextEdit-local position to Vector2I: X is a Unicode code-point column and Y a logical line. clampLine/clampColumn control text-layout clamping; an unavailable position can return (-1, -1). Not a universal control hit-test: check the local control area first. The old overload’s allowOutOfBounds actually forwards as clampLine with clampColumn always true. Prefer the three-argument overload for clarity.

# GetLineColumnAtPos · 2/2
C#
public Vector2I GetLineColumnAtPos(Vector2I position, bool clampLine = true, bool clampColumn = true);

Converts a TextEdit-local position to Vector2I: X is a Unicode code-point column and Y a logical line. clampLine/clampColumn control text-layout clamping; an unavailable position can return (-1, -1). Not a universal control hit-test: check the local control area first. The old overload’s allowOutOfBounds actually forwards as clampLine with clampColumn always true. Prefer the three-argument overload for clarity.

Parameters
NameTypeDefault
positionVector2I—
clampLinebooltrue
clampColumnbooltrue
position

Control-local pixel position rather than screen coordinates.

clampLine

Clamp the result to text-layout lines.

clampColumn

Clamp the result to the line text width.

Returns Vector2I

Converts a TextEdit-local position to Vector2I: X is a Unicode code-point column and Y a logical line. clampLine/clampColumn control text-layout clamping; an unavailable position can return (-1, -1). Not a universal control hit-test: check the local control area first. The old overload’s allowOutOfBounds actually forwards as clampLine with clampColumn always true. Prefer the three-argument overload for clarity.

GetLineCountint
# GetLineCount
C#
public int GetLineCount();

Number of logical lines, including empty ones; an empty document has 1. Visual wrapping of a long line does not add logical lines.

Returns int

Number of logical lines, including empty ones; an empty document has 1. Visual wrapping of a long line does not add logical lines.

GetLineGutterIconTexture2D
# GetLineGutterIcon
C#
public Texture2D GetLineGutterIcon(int line, int gutter);

Shared cell icon resource or null. Not a texture copy or proof that the gutter currently displays an icon.

Parameters
NameTypeDefault
lineint—
gutterint—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns Texture2D

Shared cell icon resource or null. Not a texture copy or proof that the gutter currently displays an icon.

GetLineGutterItemColorColor
# GetLineGutterItemColor
C#
public Color GetLineGutterItemColor(int line, int gutter);

Stored cell text/icon color rather than the line background or main document text color.

Parameters
NameTypeDefault
lineint—
gutterint—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns Color

Stored cell text/icon color rather than the line background or main document text color.

GetLineGutterMetadataVariant
# GetLineGutterMetadata
C#
public Variant GetLineGutterMetadata(int line, int gutter);

Returns the stored Variant. Containers remain shared with the original value. Dispose the C# Variant wrapper after use; this does not delete the gutter or model record.

Parameters
NameTypeDefault
lineint—
gutterint—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns Variant

Returns the stored Variant. Containers remain shared with the original value. Dispose the C# Variant wrapper after use; this does not delete the gutter or model record.

GetLineGutterTextstring
# GetLineGutterText
C#
public string GetLineGutterText(int line, int gutter);

Stored gutter-cell label. Retained even with another GutterType or a hidden gutter.

Parameters
NameTypeDefault
lineint—
gutterint—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns string

Stored gutter-cell label. Retained even with another GutterType or a hidden gutter.

GetLineHeightint
# GetLineHeight
C#
public int GetLineHeight();

Visual-row pixel height including theme spacing, at least 1. Need not equal the font size and is not a logical-line count.

Returns int

Visual-row pixel height including theme spacing, at least 1. Need not equal the font size and is not a logical-line count.

GetLineRangesFromCaretsReckfell.Collections.Array<Vector2I>
# GetLineRangesFromCarets
C#
public Reckfell.Collections.Array<Vector2I> GetLineRangesFromCarets(bool onlySelections = false, bool mergeAdjacent = true);

New Vector2I array of logical-line ranges: X is the first and Y the last included line. onlySelections excludes unselected carets; mergeAdjacent merges adjacent ranges. When a selection ends at column 0, that end line is excluded.

Parameters
NameTypeDefault
onlySelectionsboolfalse
mergeAdjacentbooltrue
onlySelections

Include only carets with active selections.

mergeAdjacent

Merge adjacent logical-line ranges.

Returns Reckfell.Collections.Array<Vector2I>

New Vector2I array of logical-line ranges: X is the first and Y the last included line. onlySelections excludes unselected carets; mergeAdjacent merges adjacent ranges. When a selection ends at column 0, that end line is excluded.

GetLineWidthint
# GetLineWidth
C#
public int GetLineWidth(int line, int wrapIndex = -1);

Shaped-text width in pixels. wrapIndex -1 requests the line buffer size; otherwise measures a particular visual segment. With wrapping enabled, not the width of a hypothetical unwrapped full line.

Parameters
NameTypeDefault
lineint—
wrapIndexint-1
line

Logical-line index from 0 through GetLineCount() - 1.

wrapIndex

Visual segment index; GetLineWidth uses -1 for the line buffer.

Returns int

Shaped-text width in pixels. wrapIndex -1 requests the line buffer size; otherwise measures a particular visual segment. With wrapping enabled, not the width of a hypothetical unwrapped full line.

GetLineWithImestring
# GetLineWithIme
C#
public string GetLineWithIme(int line);

Presentation line including temporary IME composition when it affects that line. Matches GetLine without composition. Save through Text/GetLine to avoid recording unfinished input as committed text.

Parameters
NameTypeDefault
lineint—
line

Logical-line index from 0 through GetLineCount() - 1.

Returns string

Presentation line including temporary IME composition when it affects that line. Matches GetLine without composition. Save through Text/GetLine to avoid recording unfinished input as committed text.

GetLineWrapCountint
# GetLineWrapCount
C#
public int GetLineWrapCount(int line);

Number of additional visual wraps in the line. Zero means one segment; total segments equal Count + 1. Not the document GetLineCount.

Parameters
NameTypeDefault
lineint—
line

Logical-line index from 0 through GetLineCount() - 1.

Returns int

Number of additional visual wraps in the line. Zero means one segment; total segments equal Count + 1. Not the document GetLineCount.

GetLineWrapIndexAtColumnint
# GetLineWrapIndexAtColumn
C#
public int GetLineWrapIndexAtColumn(int line, int column);

Index of the visual segment containing a logical-line column. Columns count Unicode code points; the line end is valid too. Returns 0 without wrapping; not a document line number.

Parameters
NameTypeDefault
lineint—
columnint—
line

Logical-line index from 0 through GetLineCount() - 1.

column

Unicode code-point column, including a valid line-end position.

Returns int

Index of the visual segment containing a logical-line column. Columns count Unicode code points; the line end is valid too. Returns 0 without wrapping; not a document line number.

GetLineWrappedTextstring[]
# GetLineWrappedText
C#
public string[] GetLineWrappedText(int line);

New array of visual segments of one logical line; without wrapping contains one element. Can include temporary IME text. Read Text to save a document. Editing the array does not modify the editor.

Parameters
NameTypeDefault
lineint—
line

Logical-line index from 0 through GetLineCount() - 1.

Returns string[]

New array of visual segments of one logical line; without wrapping contains one element. Can include temporary IME text. Read Text to save a document. Editing the array does not modify the editor.

GetLineWrappingModeTextEdit.LineWrappingMode
# GetLineWrappingMode
C#
public TextEdit.LineWrappingMode GetLineWrappingMode();

None disables visual wrapping; Boundary constrains lines to available control width. AutowrapMode chooses break points. Does not insert line separators or change GetLineCount; gutters, scrollbar, theme and minimap also affect available width.

Returns TextEdit.LineWrappingMode

None disables visual wrapping; Boundary constrains lines to available control width. AutowrapMode chooses break points. Does not insert line separators or change GetLineCount; gutters, scrollbar, theme and minimap also affect available width.

GetLocalMousePosVector2
# GetLocalMousePos
C#
public Vector2 GetLocalMousePos();

Returns the mouse position in TextEdit coordinates, mirroring X as Width - X for RTL layout. This is neither a global screen position nor text line/column coordinates. Differs from ordinary GetLocalMousePosition in RTL.

Returns Vector2

Returns the mouse position in TextEdit coordinates, mirroring X as Width - X for RTL layout. This is neither a global screen position nor text line/column coordinates. Differs from ordinary GetLocalMousePosition in RTL.

GetMenuPopupMenu
# GetMenu
C#
public PopupMenu GetMenu();

Returns the built-in PopupMenu, creating it on first access without opening it. Repeated calls return the same object. TextEdit owns and frees the menu: do not Free or Dispose this borrowed object. MenuItems defines built-in command IDs; use distinct IDs for application items.

Returns PopupMenu

Returns the built-in PopupMenu, creating it on first access without opening it. Repeated calls return the same object. TextEdit owns and frees the menu: do not Free or Dispose this borrowed object. MenuItems defines built-in command IDs; use distinct IDs for application items.

GetMinimapLineAtPosint
# GetMinimapLineAtPos
C#
public int GetMinimapLineAtPos(Vector2I position);

Computes a minimap logical line from a control-local vertical position, accounting for scrolling, wrapping and hiding. Clamps the result to document line bounds. Does not test X or return -1 merely because the point is outside the minimap: check its rectangle first.

Parameters
NameTypeDefault
positionVector2I—
position

Control-local pixel position; minimap lookup uses Y without checking X.

Returns int

Computes a minimap logical line from a control-local vertical position, accounting for scrolling, wrapping and hiding. Clamps the result to document line bounds. Does not test X or return -1 merely because the point is outside the minimap: check its rectangle first.

GetMinimapVisibleLinesint
# GetMinimapVisibleLines
C#
public int GetMinimapVisibleLines();

Returns the minimap’s vertical row capacity: available height divided by minimap row height plus spacing. This is neither the document line count nor the number of rows actually containing text. Use GetLineCount for logical lines.

Returns int

Returns the minimap’s vertical row capacity: available height divided by minimap row height plus spacing. This is neither the document line count nor the number of rows actually containing text. Use GetLineCount for logical lines.

GetMinimapWidthint
# GetMinimapWidth
C#
public int GetMinimapWidth();

Minimap area width in control pixels. Use a nonnegative value that leaves room for the main text. This is not a minimap font scale. Changing it recalculates available wrap width; use MinimapDraw false to disable the minimap.

Returns int

Minimap area width in control pixels. Use a nonnegative value that leaves room for the main text. This is not a minimap font scale. Changing it recalculates available wrap width; use MinimapDraw false to disable the minimap.

GetNextCompositeCharacterColumnint
# GetNextCompositeCharacterColumn
C#
public int GetNextCompositeCharacterColumn(int line, int column);

Next composite-character boundary from TextServer-shaped text. Input and result are Unicode code-point columns rather than UTF-16 indices. At line end, returns the same end column. One visible composite character can span more than one column.

Parameters
NameTypeDefault
lineint—
columnint—
line

Logical-line index from 0 through GetLineCount() - 1.

column

Unicode code-point column rather than a UTF-16 index.

Returns int

Next composite-character boundary from TextServer-shaped text. Input and result are Unicode code-point columns rather than UTF-16 indices. At line end, returns the same end column. One visible composite character can span more than one column.

GetNextVisibleLineIndexOffsetFromVector2I
# GetNextVisibleLineIndexOffsetFrom
C#
public Vector2I GetNextVisibleLineIndexOffsetFrom(int line, int wrapIndex, int visibleAmount);

Traverses visible rows including wrapping and hidden lines. Vector2I.X is the count of traversed logical lines including the starting line, not an absolute index; Y is the destination wrap-part index. The sign of visibleAmount selects direction. For nonzero traversal, compute the destination as line + X - 1 downward or line - X + 1 upward and validate bounds. For example, reaching the second display row within the same logical line returns (1, 1). visibleAmount 0 returns (0, 0).

Parameters
NameTypeDefault
lineint—
wrapIndexint—
visibleAmountint—
line

Existing starting logical line, indexed from zero.

wrapIndex

Starting line wrap-part index from 0 through GetLineWrapCount(line).

visibleAmount

Visible-row count including the start; positive downward, negative upward. Use a nonzero value when computing a destination.

Returns Vector2I

Traverses visible rows including wrapping and hidden lines. Vector2I.X is the count of traversed logical lines including the starting line, not an absolute index; Y is the destination wrap-part index. The sign of visibleAmount selects direction. For nonzero traversal, compute the destination as line + X - 1 downward or line - X + 1 upward and validate bounds. For example, reaching the second display row within the same logical line returns (1, 1). visibleAmount 0 returns (0, 0).

GetNextVisibleLineOffsetFromint
# GetNextVisibleLineOffsetFrom
C#
public int GetNextVisibleLineOffsetFrom(int line, int visibleAmount);

Counts traversed logical lines while visiting visible lines, including the starting line; hidden lines count toward the result but not as visible lines. The sign of visibleAmount selects direction; the result is nonnegative. This is a count, not a destination index or pixel distance. Without hiding it returns Abs(visibleAmount), even beyond document bounds: validate the computed index. For a nonempty traversal, the destination is line + result - 1 downward or line - result + 1 upward.

Parameters
NameTypeDefault
lineint—
visibleAmountint—
line

Existing starting logical line, indexed from zero.

visibleAmount

Visible-row count including the start; positive downward, negative upward. Use a nonzero value when computing a destination.

Returns int

Counts traversed logical lines while visiting visible lines, including the starting line; hidden lines count toward the result but not as visible lines. The sign of visibleAmount selects direction; the result is nonnegative. This is a count, not a destination index or pixel distance. Without hiding it returns Abs(visibleAmount), even beyond document bounds: validate the computed index. For a nonempty traversal, the destination is line + result - 1 downward or line - result + 1 upward.

GetPlaceholderstring
# GetPlaceholder
C#
public string GetPlaceholder();

Empty-editor hint, separate from Text. GetPlaceholder returns the source string; presentation uses UI translation. Not part of document saving, searching or content history.

Returns string

Empty-editor hint, separate from Text. GetPlaceholder returns the source string; presentation uses UI translation. Not part of document saving, searching or content history.

GetPosAtLineColumnVector2I
# GetPosAtLineColumn
C#
public Vector2I GetPosAtLineColumn(int line, int column);

Local character reference point: GetRectAtLineColumn position plus (0, GetLineHeight()). A bottom point rather than the rectangle’s top-left corner. Depends on the drawing cache and returns (-1, -1) when unavailable.

Parameters
NameTypeDefault
lineint—
columnint—
line

Logical-line index from 0 through GetLineCount() - 1.

column

Unicode code-point column, including a valid line-end position.

Returns Vector2I

Local character reference point: GetRectAtLineColumn position plus (0, GetLineHeight()). A bottom point rather than the rectangle’s top-left corner. Depends on the drawing cache and returns (-1, -1) when unavailable.

GetPreviousCompositeCharacterColumnint
# GetPreviousCompositeCharacterColumn
C#
public int GetPreviousCompositeCharacterColumn(int line, int column);

Previous composite-character boundary in Unicode code-point columns. Returns 0 at line start. Do not always subtract 1 for user deletion: combining marks can form one composite character.

Parameters
NameTypeDefault
lineint—
columnint—
line

Logical-line index from 0 through GetLineCount() - 1.

column

Unicode code-point column rather than a UTF-16 index.

Returns int

Previous composite-character boundary in Unicode code-point columns. Returns 0 at line start. Do not always subtract 1 for user deletion: combining marks can form one composite character.

GetRectAtLineColumnRect2I
# GetRectAtLineColumn
C#
public Rect2I GetRectAtLineColumn(int line, int column);

Character/grapheme rectangle in TextEdit-local coordinates from the latest drawing cache. An unavailable/undrawn position returns (-1, -1, 0, 0); an empty document is a special case with an empty Rect2I at the origin. Query after layout/drawing rather than retaining permanent document coordinates.

Parameters
NameTypeDefault
lineint—
columnint—
line

Logical-line index from 0 through GetLineCount() - 1.

column

Unicode code-point column, including a valid line-end position.

Returns Rect2I

Character/grapheme rectangle in TextEdit-local coordinates from the latest drawing cache. An unavailable/undrawn position returns (-1, -1, 0, 0); an empty document is a special case with an empty Rect2I at the origin. Query after layout/drawing rather than retaining permanent document coordinates.

GetSavedVersionuint
# GetSavedVersion
C#
public uint GetSavedVersion();

Last TagSavedVersion marker; ClearUndoHistory resets it. Does not prove that a disk file exists or is current.

Returns uint

Last TagSavedVersion marker; ClearUndoHistory resets it. Does not prove that a disk file exists or is current.

GetScrollPosForLinedouble
# GetScrollPosForLine
C#
public double GetScrollPosForLine(int line, int wrapIndex = 0);

Vertical position of a logical line and its wrapIndex in visual-row units. Without wrapping/hiding, equals the logical line number. Can be passed to SetVScroll, which can clamp it to the available range.

Parameters
NameTypeDefault
lineint—
wrapIndexint0
line

Logical-line index from 0 through GetLineCount() - 1.

wrapIndex

Visual segment index; GetLineWidth uses -1 for the line buffer.

Returns double

Vertical position of a logical line and its wrapIndex in visual-row units. Without wrapping/hiding, equals the logical line number. Can be passed to SetVScroll, which can clamp it to the available range.

GetSelectedTextstring
# GetSelectedText
C#
public string GetSelectedText(int caretIndex = -1);

Selection text without modifying the document. With caretIndex -1, joins nonempty selections in document order with a newline; this is not one original contiguous range. Read each caret explicitly to retain separate fragments. Returns an empty string without selection.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns string

Selection text without modifying the document. With caretIndex -1, joins nonempty selections in document order with a newline; this is not one original contiguous range. Read each caret explicitly to retain separate fragments. Returns an empty string without selection.

GetSelectionAtLineColumnint
# GetSelectionAtLineColumn
C#
public int GetSelectionAtLineColumn(int line, int column, bool includeEdges = true, bool onlySelections = true);

Index of the first caret/selection containing the position, or -1. includeEdges controls boundary inclusion; onlySelections excludes unselected carets. With overlaps, returns the first matching index rather than all matches.

Parameters
NameTypeDefault
lineint—
columnint—
includeEdgesbooltrue
onlySelectionsbooltrue
line

Zero-based logical line.

column

Column in Unicode code points rather than a UTF-16 index.

includeEdges

Include the tested range boundaries.

onlySelections

Include only carets with active selections.

Returns int

Index of the first caret/selection containing the position, or -1. includeEdges controls boundary inclusion; onlySelections excludes unselected carets. With overlaps, returns the first matching index rather than all matches.

GetSelectionColumnint · Deprecated
# GetSelectionColumn
C#
public int GetSelectionColumn(int caretIndex = 0);

Obsolete alias for GetSelectionOriginColumn. Explicitly choose the Origin anchor or normalized From start in new code.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Obsolete alias for GetSelectionOriginColumn. Explicitly choose the Origin anchor or normalized From start in new code.

GetSelectionFromColumnint
# GetSelectionFromColumn
C#
public int GetSelectionFromColumn(int caretIndex = 0);

Normalized start column paired with GetSelectionFromLine. Without selection, the caret column. Counts Unicode code points rather than UTF-16 indices.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Normalized start column paired with GetSelectionFromLine. Without selection, the caret column. Counts Unicode code points rather than UTF-16 indices.

GetSelectionFromLineint
# GetSelectionFromLine
C#
public int GetSelectionFromLine(int caretIndex = 0);

Earlier boundary of the active selection in document order. Without selection, returns the caret line. Not always the anchor line.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Earlier boundary of the active selection in document order. Without selection, returns the caret line. Not always the anchor line.

GetSelectionLineint · Deprecated
# GetSelectionLine
C#
public int GetSelectionLine(int caretIndex = 0);

Obsolete alias for GetSelectionOriginLine rather than the normalized start. Use Origin or GetSelectionFromLine as appropriate in new code.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Obsolete alias for GetSelectionOriginLine rather than the normalized start. Use Origin or GetSelectionFromLine as appropriate in new code.

GetSelectionModeTextEdit.SelectionMode
# GetSelectionMode
C#
public TextEdit.SelectionMode GetSelectionMode();

Returns the selection-processing mode, such as Pointer or Word. This does not test whether text is selected: use HasSelection. None mode does not by itself mean there is no selection.

Returns TextEdit.SelectionMode

Returns the selection-processing mode, such as Pointer or Word. This does not test whether text is selected: use HasSelection. None mode does not by itself mean there is no selection.

GetSelectionOriginColumnint
# GetSelectionOriginColumn
C#
public int GetSelectionOriginColumn(int caretIndex = 0);

Anchor column in Unicode code points. Can follow the active caret in a backward selection; use GetSelectionFromColumn for the normalized start.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Anchor column in Unicode code points. Can follow the active caret in a backward selection; use GetSelectionFromColumn for the normalized start.

GetSelectionOriginLineint
# GetSelectionOriginLine
C#
public int GetSelectionOriginLine(int caretIndex = 0);

Selection-anchor line for the specified caret. This is the original gesture endpoint rather than necessarily the lower line number. Check HasSelection before treating it as an active selection boundary.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Selection-anchor line for the specified caret. This is the original gesture endpoint rather than necessarily the lower line number. Check HasSelection before treating it as an active selection boundary.

GetSelectionToColumnint
# GetSelectionToColumn
C#
public int GetSelectionToColumn(int caretIndex = 0);

Exclusive end column paired with GetSelectionToLine. Without selection, the caret column. Not the selection length when multiple lines are involved.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Exclusive end column paired with GetSelectionToLine. Without selection, the caret column. Not the selection length when multiple lines are involved.

GetSelectionToLineint
# GetSelectionToLine
C#
public int GetSelectionToLine(int caretIndex = 0);

Later boundary of the active selection in document order. Without selection, returns the caret line. The final text position is exclusive.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns int

Later boundary of the active selection in document order. Without selection, returns the caret line. The final text position is exclusive.

GetSortedCaretsint[]
# GetSortedCarets
C#
public int[] GetSortedCarets(bool includeIgnoredCarets = false);

New index array ordered top-to-bottom by normalized selection start or caret position. Does not change actual indices or creation order. By default excludes temporarily ignored carets during a multicaret edit. Do not retain the array after the caret set changes.

Parameters
NameTypeDefault
includeIgnoredCaretsboolfalse
includeIgnoredCarets

Include temporarily ignored multicaret-edit indices.

Returns int[]

New index array ordered top-to-bottom by normalized selection start or caret position. Does not change actual indices or creation order. By default excludes temporarily ignored carets during a multicaret edit. Do not retain the array after the caret set changes.

GetStructuredTextBidiOverrideTextServer.StructuredTextParser
# GetStructuredTextBidiOverride
C#
public TextServer.StructuredTextParser GetStructuredTextBidiOverride();

Structured-text parser for mixed LTR/RTL: URI, path, email, list and other supported modes. Controls separator presentation rather than converting document encoding. Configure parser options separately.

Returns TextServer.StructuredTextParser

Structured-text parser for mixed LTR/RTL: URI, path, email, list and other supported modes. Controls separator presentation rather than converting document encoding. Configure parser options separately.

GetStructuredTextBidiOverrideOptionsReckfell.Collections.Array
# GetStructuredTextBidiOverrideOptions
C#
public Reckfell.Collections.Array GetStructuredTextBidiOverrideOptions();

Shared Array of BiDi parser options. The setter compares contents and skips equal values; merely assigning Duplicate with old contents does not detach the previous array. In-place mutation does not trigger text recalculation. Supply a separately prepared array and a new array with changed contents when updating.

Returns Reckfell.Collections.Array

Shared Array of BiDi parser options. The setter compares contents and skips equal values; merely assigning Duplicate with old contents does not detach the previous array. In-place mutation does not trigger text recalculation. Supply a separately prepared array and a new array with changed contents when updating.

GetSyntaxHighlighterSyntaxHighlighter
# GetSyntaxHighlighter
C#
public SyntaxHighlighter GetSyntaxHighlighter();

This editor’s highlighting resource; null disables highlighting. Use one instance per TextEdit because the resource stores only one context. Reassigning the same resource is skipped and does not replace ClearHighlightingCache/EmitChanged.

Returns SyntaxHighlighter

This editor’s highlighting resource; null disables highlighting. Use one instance per TextEdit because the resource stores only one context. Reassigning the same resource is skipped and does not replace ClearHighlightingCache/EmitChanged.

GetTabInputModebool
# GetTabInputMode
C#
public bool GetTabInputMode();

Controls editor handling of the Tab key. Does not convert existing tab characters, set their width or automatically translate indentation to spaces.

Returns bool

Controls editor handling of the Tab key. Does not convert existing tab characters, set their width or automatically translate indentation to spaces.

GetTabSizeint
# GetTabSize
C#
public int GetTabSize();

Stored tab width for layout rather than the number of tab characters in the document.

Returns int

Stored tab width for layout rather than the number of tab characters in the document.

GetTextstring
# GetText
C#
public string GetText();

Full text with \n line separators. Assignment replaces the document, emits TextSet without TextChanged and allows Undo with history enabled. For a newly loaded document, explicitly clear history and mark the saved version afterward.

Returns string

Full text with \n line separators. Assignment replaces the document, emits TextSet without TextChanged and allows Undo with history enabled. For a newly loaded document, explicitly clear history and mark the saved version afterward.

GetTextDirectionControl.TextDirection
# GetTextDirection
C#
public Control.TextDirection GetTextDirection();

Base text direction: Inherited follows Control layout, Auto derives it from text, and Ltr/Rtl set it explicitly. Does not translate or reverse stored Text. Document character order remains logical.

Returns Control.TextDirection

Base text direction: Inherited follows Control layout, Auto derives it from text, and Ltr/Rtl set it explicitly. Does not translate or reverse stored Text. Document character order remains logical.

GetTotalGutterWidthint
# GetTotalGutterWidth
C#
public int GetTotalGutterWidth();

Sum of drawn gutter widths plus internal padding. Current implementation limitation: hiding or removing all previously drawn gutters can leave 2 pixels of padding. Use GetGutterCount to test whether definitions exist; this is not one gutter’s width.

Returns int

Sum of drawn gutter widths plus internal padding. Current implementation limitation: hiding or removing all previously drawn gutters can leave 2 pixels of padding. Use GetGutterCount to test whether definitions exist; this is not one gutter’s width.

GetTotalVisibleLineCountint
# GetTotalVisibleLineCount
C#
public int GetTotalVisibleLineCount();

Total document visual-row count: logical lines plus wraps, excluding hidden lines when hiding is supported. Not limited to the current scrolled viewport.

Returns int

Total document visual-row count: logical lines plus wraps, excluding hidden lines when hiding is supported. Not limited to the current scrolled viewport.

GetVScrolldouble
# GetVScroll
C#
public double GetVScroll();

Vertical offset in visual-row units, allowing a fractional part. Not pixels or always a logical line number: use GetScrollPosForLine with wrapping. The getter returns the actual clamped value.

Returns double

Vertical offset in visual-row units, allowing a fractional part. Not pixels or always a logical line number: use GetScrollPosForLine with wrapping. The getter returns the actual clamped value.

GetVScrollBarVScrollBar
# GetVScrollBar
C#
public VScrollBar GetVScrollBar();

Internal VScrollBar owned by TextEdit. Do not free or reparent it separately; freeing the editor frees the scrollbar. Values are visual rows rather than pixels.

Returns VScrollBar

Internal VScrollBar owned by TextEdit. Do not free or reparent it separately; freeing the editor frees the scrollbar. Values are visual rows rather than pixels.

GetVScrollSpeedfloat
# GetVScrollSpeed
C#
public float GetVScrollSpeed();

Smooth vertical scrolling speed, at least 1. Does not set the current offset or represent line height or a horizontal step size.

Returns float

Smooth vertical scrolling speed, at least 1. Does not set the current offset or represent line height or a horizontal step size.

GetVersionuint
# GetVersion
C#
public uint GetVersion();

Identifier of the current editing-history state rather than an engine version or text hash. Undo can restore an earlier value. Compare with GetSavedVersion within the current document and history.

Returns uint

Identifier of the current editing-history state rather than an engine version or text hash. Undo can restore an earlier value. Compare with GetSavedVersion within the current document and history.

GetVirtualKeyboardShowOnFocusbool
# GetVirtualKeyboardShowOnFocus
C#
public bool GetVirtualKeyboardShowOnFocus();

Allows requesting the on-screen keyboard on focus. Requires VirtualKeyboardEnabled, Editable and platform support. false disables focus-triggered opening rather than every other keyboard-opening path.

Returns bool

Allows requesting the on-screen keyboard on focus. Requires VirtualKeyboardEnabled, Editable and platform support. false disables focus-triggered opening rather than every other keyboard-opening path.

GetVisibleLineCountint
# GetVisibleLineCount
C#
public int GetVisibleLineCount();

Number of whole visual rows that fit in the control height. View capacity rather than the number of document lines currently drawn.

Returns int

Number of whole visual rows that fit in the control height. View capacity rather than the number of document lines currently drawn.

GetVisibleLineCountInRangeint
# GetVisibleLineCountInRange
C#
public int GetVisibleLineCountInRange(int fromLine, int toLine);

Visual-row count in a logical-line range with both endpoints included. Accounts for wrapping/hiding and normalizes reversed arguments. Does not count only the rows currently visible on screen.

Parameters
NameTypeDefault
fromLineint—
toLineint—
fromLine

Included logical-line range boundary.

toLine

Included range boundary; reversed order is allowed.

Returns int

Visual-row count in a logical-line range with both endpoints included. Accounts for wrapping/hiding and normalizes reversed arguments. Does not count only the rows currently visible on screen.

GetWordAtPosstring
# GetWordAtPos
C#
public string GetWordAtPos(Vector2 position);

Returns the text-system word at a control-local position, accounting for scrolling and wrapping. Does not move the caret or create a selection. Returns an empty string when no word/text is hit. Supply control coordinates rather than screen coordinates; word rules are not a C# parser.

Parameters
NameTypeDefault
positionVector2—
position

Control-local pixel position; minimap lookup uses Y without checking X.

Returns string

Returns the text-system word at a control-local position, accounting for scrolling and wrapping. Does not move the caret or create a selection. Returns an empty string when no word/text is hit. Supply control coordinates rather than screen coordinates; word rules are not a C# parser.

GetWordUnderCaretstring
# GetWordUnderCaret
C#
public string GetWordUnderCaret(int caretIndex = -1);

Returns the TextServer-bounded word near a caret. caretIndex -1 can join words from multiple carets with newlines in index order rather than document order. Supply an explicit index for one word. Not a Search operation or C# compiler identifier analysis.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Caret index; -1 processes all carets.

Returns string

Returns the TextServer-bounded word near a caret. caretIndex -1 can join words from multiple carets with newlines in index order rather than document order. Supply an explicit index for one word. Not a Search operation or C# compiler identifier analysis.

HasImeTextbool
# HasImeText
C#
public bool HasImeText();

Whether temporary IME composition text exists. Not a test for Editable, a connected keyboard or unsaved document changes.

Returns bool

Whether temporary IME composition text exists. Not a test for Editable, a connected keyboard or unsaved document changes.

HasRedobool
# HasRedo
C#
public bool HasRedo();

Whether an undone operation is available for redo. Executing Redo additionally requires Editable true.

Returns bool

Whether an undone operation is available for redo. Executing Redo additionally requires Editable true.

HasSelectionbool
# HasSelection
C#
public bool HasSelection(int caretIndex = -1);

Whether a caret has an active selection. Default caretIndex -1 checks any caret, while 0 checks only the main caret. Does not mean document text changed.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns bool

Whether a caret has an active selection. Default caretIndex -1 checks any caret, while 0 checks only the main caret. Does not mean document text changed.

HasUndobool
# HasUndo
C#
public bool HasUndo();

Whether an undo operation exists, including a pending current record. Does not grant permission to Undo: Editable must be true.

Returns bool

Whether an undo operation exists, including a pending current record. Does not grant permission to Undo: Editable must be true.

InsertLineAtvoid
# InsertLineAt
C#
public void InsertLineAt(int line, string text);

Inserts text and a line separator before an existing logical line. line must be less than GetLineCount; Count is not an append command. Inserted text can contain additional line separators. One Undo reverses the operation.

Parameters
NameTypeDefault
lineint—
textstring—
line

Existing logical-line index from 0 through GetLineCount() - 1.

text

Text to insert; line separators create additional logical lines.

InsertTextvoid
# InsertText
C#
public void InsertText(string text, int line, int column, bool beforeSelectionBegin = true, bool beforeSelectionEnd = false);

Inserts text at the supplied position without deleting an existing selection. Adjusts carets and selection bounds; beforeSelectionBegin/End control insertion exactly at a boundary. Undoable and works with Editable false. Use InsertTextAtCaret to replace selection.

Parameters
NameTypeDefault
textstring—
lineint—
columnint—
beforeSelectionBeginbooltrue
beforeSelectionEndboolfalse
text

Text to insert; line separators create additional logical lines.

line

Existing logical-line index from 0 through GetLineCount() - 1.

column

Insertion column in Unicode code points from 0 through line length.

beforeSelectionBegin

At the selection start, true shifts the start past inserted text, excluding it; false retains the start before inserted text.

beforeSelectionEnd

At the selection end, true shifts the end past inserted text, including it; false retains the end before inserted text.

InsertTextAtCaretvoid
# InsertTextAtCaret
C#
public void InsertTextAtCaret(string text, int caretIndex = -1);

Inserts text, replaces the target caret’s selection and moves it to the insertion end. caretIndex -1 processes all eligible carets; 0 targets the main caret. Programmatic calls also work with Editable false. Supply an explicit index when only one insertion is intended in a multicaret editor.

Parameters
NameTypeDefault
textstring—
caretIndexint-1
text

Text to insert or assign; \n creates logical lines.

caretIndex

0 targets the main caret; -1 targets all eligible carets; any other index must exist.

IsBackspaceDeletesCompositeCharacterEnabledbool
# IsBackspaceDeletesCompositeCharacterEnabled
C#
public bool IsBackspaceDeletesCompositeCharacterEnabled();

With true, normal Backspace deletes to the previous composite-character boundary; false deletes one code point. CaretMidGrapheme true takes priority and also selects one-code-point deletion. Does not control RemoveText with an explicit range.

Returns bool

With true, normal Backspace deletes to the previous composite-character boundary; false deletes one code point. CaretMidGrapheme true takes priority and also selects one-code-point deletion. Does not control RemoveText with an explicit range.

IsCaretAfterSelectionOriginbool
# IsCaretAfterSelectionOrigin
C#
public bool IsCaretAfterSelectionOrigin(int caretIndex = 0);

Whether the active caret follows its anchor in document order. Use to retain selection direction; does not test whether a selection exists.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns bool

Whether the active caret follows its anchor in document order. Use to retain selection direction; does not test whether a selection exists.

IsCaretBlinkEnabledbool
# IsCaretBlinkEnabled
C#
public bool IsCaretBlinkEnabled();

Enables text-caret blinking. The timer runs while focused; false disables blinking rather than hiding the caret. Visibility still depends on focus and other drawing conditions. Configure timing with CaretBlinkInterval.

Returns bool

Current CaretBlink setting; does not prove the effect is visible in this frame.

IsCaretMidGraphemeEnabledbool
# IsCaretMidGraphemeEnabled
C#
public bool IsCaretMidGraphemeEnabled();

Allows caret/deletion behavior inside composite characters. With true, Backspace deletes one code point even if BackspaceDeletesCompositeCharacterEnabled is enabled. Does not mean operating on halves of a UTF-16 surrogate pair.

Returns bool

Allows caret/deletion behavior inside composite characters. With true, Backspace deletes one code point even if BackspaceDeletesCompositeCharacterEnabled is enabled. Does not mean operating on halves of a UTF-16 surrogate pair.

IsCaretVisiblebool
# IsCaretVisible
C#
public bool IsCaretVisible(int caretIndex = 0);

Cached caret visibility from drawing. Not equivalent to caret existence, Editable or visibility of the whole logical line. Can be stale before current drawing.

Parameters
NameTypeDefault
caretIndexint0
caretIndex

Current index of one caret; 0 is the main caret.

Returns bool

Cached caret visibility from drawing. Not equivalent to caret existence, Editable or visibility of the whole logical line. Can be stale before current drawing.

IsContextMenuEnabledbool
# IsContextMenuEnabled
C#
public bool IsContextMenuEnabled();

Allows the user to open the built-in context menu. false neither deletes the PopupMenu nor prevents programmatic GetMenu or MenuOption calls. This is an interface setting, not an editing restriction; use Editable to control input.

Returns bool

Allows the user to open the built-in context menu. false neither deletes the PopupMenu nor prevents programmatic GetMenu or MenuOption calls. This is an interface setting, not an editing restriction; use Editable to control input.

IsCustomWordSeparatorsEnabledbool
# IsCustomWordSeparatorsEnabled
C#
public bool IsCustomWordSeparatorsEnabled();

Enables CustomWordSeparators for word-boundary processing. Independent of UseDefaultWordSeparators; both sets can be used together. Does not switch Search into WholeWords mode.

Returns bool

Enables CustomWordSeparators for word-boundary processing. Independent of UseDefaultWordSeparators; both sets can be used together. Does not switch Search into WholeWords mode.

IsDefaultWordSeparatorsEnabledbool
# IsDefaultWordSeparatorsEnabled
C#
public bool IsDefaultWordSeparatorsEnabled();

Enables the text system’s default word separators. Disabling does not enable custom separators automatically; configure UseCustomWordSeparators separately. Does not change Search WholeWords boundary checks.

Returns bool

Enables the text system’s default word separators. Disabling does not enable custom separators automatically; configure UseCustomWordSeparators separately. Does not change Search WholeWords boundary checks.

IsDeselectOnFocusLossEnabledbool
# IsDeselectOnFocusLossEnabled
C#
public bool IsDeselectOnFocusLossEnabled();

Controls deselection on focus loss. false retains selection when another control receives focus. Switching false to true while this editor is unfocused immediately clears an existing selection. Does not edit text or transfer focus.

Returns bool

Controls deselection on focus loss. false retains selection when another control receives focus. Switching false to true while this editor is unfocused immediately clears an existing selection. Does not edit text or transfer focus.

IsDragAndDropSelectionEnabledbool
# IsDragAndDropSelectionEnabled
C#
public bool IsDragAndDropSelectionEnabled();

Allows the user to drag selected text through TextEdit’s drag-and-drop handling. Does not create a selection, perform a transfer on assignment or automatically enable file/project-object drops. Selection separately requires SelectingEnabled.

Returns bool

Current DragAndDropSelectionEnabled setting; does not prove the effect is visible in this frame.

IsDraggingCursorbool
# IsDraggingCursor
C#
public bool IsDraggingCursor();

true during TextEdit’s internal selection or minimap dragging. This is control interaction state, not a global mouse-button test or detection of an arbitrary drag-and-drop operation.

Returns bool

true during TextEdit’s internal selection or minimap dragging. This is control interaction state, not a global mouse-button test or detection of an arbitrary drag-and-drop operation.

IsDrawingCaretWhenEditableDisabledbool
# IsDrawingCaretWhenEditableDisabled
C#
public bool IsDrawingCaretWhenEditableDisabled();

Allows caret drawing with Editable false, subject to the remaining visibility conditions. Does not allow input or make the control editable. Leave false for ordinary text viewing without a caret.

Returns bool

Current CaretDrawWhenEditableDisabled setting; does not prove the effect is visible in this frame.

IsDrawingMinimapbool
# IsDrawingMinimap
C#
public bool IsDrawingMinimap();

Shows the document minimap. It takes part of TextEdit’s width, so enabling it can change the number of display rows when wrapping is enabled. Source Text and logical line count remain unchanged. Set its width with MinimapWidth.

Returns bool

Current MinimapDraw setting; does not prove the effect is visible in this frame.

IsDrawingSpacesbool
# IsDrawingSpaces
C#
public bool IsDrawingSpaces();

Shows space markers without changing Text or selection rules. Presentation rather than adding characters to a file.

Returns bool

Shows space markers without changing Text or selection rules. Presentation rather than adding characters to a file.

IsDrawingTabsbool
# IsDrawingTabs
C#
public bool IsDrawingTabs();

Shows visual tab markers while retaining document text. Does not enable Tab input or convert tabs into spaces.

Returns bool

Shows visual tab markers while retaining document text. Does not enable Tab input or convert tabs into spaces.

IsEditablebool
# IsEditable
C#
public bool IsEditable();

Allows user editing; default true. false also blocks Undo/Redo actions, but not programmatic Text, SetLine, InsertTextAtCaret or RemoveText. This is a UI mode rather than model-data protection.

Returns bool

Allows user editing; default true. false also blocks Undo/Redo actions, but not programmatic Text, SetLine, InsertTextAtCaret or RemoveText. This is a UI mode rather than model-data protection.

IsEmojiMenuEnabledbool
# IsEmojiMenuEnabled
C#
public bool IsEmojiMenuEnabled();

Allows the context-menu emoji command when the platform supports a system picker. false disables the corresponding item rather than necessarily removing it. Editable is also required. Does not add an emoji font or guarantee a system picker on every platform.

Returns bool

Allows the context-menu emoji command when the platform supports a system picker. false disables the corresponding item rather than necessarily removing it. Editable is also required. Does not add an emoji font or guarantee a system picker on every platform.

IsEmptySelectionClipboardEnabledbool
# IsEmptySelectionClipboardEnabled
C#
public bool IsEmptySelectionClipboardEnabled();

Allows default Copy and Cut to operate on full lines when no text is selected. Defaults to true. Does not mean copying an empty string: it copies the entire caret line, which Cut may remove. Does not affect selected-text handling; assigning the property does not access the clipboard.

Returns bool

The corresponding setting, not the presence of clipboard data or platform support.

IsFitContentHeightEnabledbool
# IsFitContentHeightEnabled
C#
public bool IsFitContentHeightEnabled();

Returns ScrollFitContentHeight rather than whether all text is visible without scrolling. Final size depends on the parent layout.

Returns bool

Returns ScrollFitContentHeight rather than whether all text is visible without scrolling. Final size depends on the parent layout.

IsFitContentWidthEnabledbool
# IsFitContentWidthEnabled
C#
public bool IsFitContentWidthEnabled();

Returns ScrollFitContentWidth rather than testing the absence of horizontal scrolling. Final size depends on parent layout and wrapping.

Returns bool

Returns ScrollFitContentWidth rather than testing the absence of horizontal scrolling. Final size depends on parent layout and wrapping.

IsGutterClickablebool
# IsGutterClickable
C#
public bool IsGutterClickable(int gutter);

The gutter’s own global flag rather than its effective OR with per-line IsLineGutterClickable or permission to execute a command.

Parameters
NameTypeDefault
gutterint—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns bool

The gutter’s own global flag rather than its effective OR with per-line IsLineGutterClickable or permission to execute a command.

IsGutterDrawnbool
# IsGutterDrawn
C#
public bool IsGutterDrawn(int gutter);

Whether drawing is enabled for the gutter definition. Does not test whether a particular line is inside the editor viewport.

Parameters
NameTypeDefault
gutterint—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns bool

Whether drawing is enabled for the gutter definition. Does not test whether a particular line is inside the editor viewport.

IsGutterOverwritablebool
# IsGutterOverwritable
C#
public bool IsGutterOverwritable(int gutter);

Whether the gutter participates in MergeGutters. Not a user text-editing flag.

Parameters
NameTypeDefault
gutterint—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns bool

Whether the gutter participates in MergeGutters. Not a user text-editing flag.

IsHighlightAllOccurrencesEnabledbool
# IsHighlightAllOccurrencesEnabled
C#
public bool IsHighlightAllOccurrencesEnabled();

Highlights case-sensitive whole-word matches of caret 0’s selected text. Empty or whitespace-only selections are ignored. Creates no additional selections and does not set SetSearchText. Differs from AddSelectionForNextOccurrence, which allows substring matches.

Returns bool

Current HighlightAllOccurrences setting; does not prove the effect is visible in this frame.

IsHighlightCurrentLineEnabledbool
# IsHighlightCurrentLineEnabled
C#
public bool IsHighlightCurrentLineEnabled();

Highlights the background of current caret lines using the theme color. This is visual highlighting rather than text selection: HasSelection and GetSelectedText are unchanged. Use Select for an explicit range.

Returns bool

Current HighlightCurrentLine setting; does not prove the effect is visible in this frame.

IsInMulitcaretEditbool
# IsInMulitcaretEdit
C#
public bool IsInMulitcaretEdit();

Whether a BeginMulticaretEdit scope is active. Mulitcaret is the spelling in the current C# API; use the exact name. Does not mean that more than one caret exists.

Returns bool

Whether a BeginMulticaretEdit scope is active. Mulitcaret is the spelling in the current C# API; use the exact name. Does not mean that more than one caret exists.

IsIndentWrappedLinesbool
# IsIndentWrappedLines
C#
public bool IsIndentWrappedLines();

Adds visual indentation to wrapped continuations. Does not insert spaces/tabs or change text or logical line numbers.

Returns bool

Adds visual indentation to wrapped continuations. Does not insert spaces/tabs or change text or logical line numbers.

IsLineGutterClickablebool
# IsLineGutterClickable
C#
public bool IsLineGutterClickable(int line, int gutter);

This cell’s own flag. Does not include global IsGutterClickable, so false does not guarantee an ordinary hover cursor.

Parameters
NameTypeDefault
lineint—
gutterint—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

Returns bool

This cell’s own flag. Does not include global IsGutterClickable, so false does not guarantee an ordinary hover cursor.

IsLineInViewportbool
# IsLineInViewport
C#
public bool IsLineInViewport(int line);

Viewport line query with an implementation limitation: its upper-bound check compares the logical line number with the wrap index. When scrolled into a long line, the result can depend on that line number. Do not use it as the only wrapped-text visibility test; check a specific position with GetRectAtLineColumn after drawing or compute bounds using line and wrapIndex.

Parameters
NameTypeDefault
lineint—
line

Logical-line index from 0 through GetLineCount() - 1.

Returns bool

Viewport line query with an implementation limitation: its upper-bound check compares the logical line number with the wrap index. When scrolled into a long line, the result can depend on that line number. Do not use it as the only wrapped-text visibility test; check a specific position with GetRectAtLineColumn after drawing or compute bounds using line and wrapIndex.

IsLineWrappedbool
# IsLineWrapped
C#
public bool IsLineWrapped(int line);

Whether a logical line has additional visual segments under the current width and WrapMode. Recheck after resizing; not a test for a document line separator.

Parameters
NameTypeDefault
lineint—
line

Logical-line index from 0 through GetLineCount() - 1.

Returns bool

Whether a logical line has additional visual segments under the current width and WrapMode. Recheck after resizing; not a test for a document line separator.

IsMenuVisiblebool
# IsMenuVisible
C#
public bool IsMenuVisible();

Tests the actual visibility of the existing built-in menu. Returns false before menu creation and does not create it. Not equivalent to ContextMenuEnabled.

Returns bool

Tests the actual visibility of the existing built-in menu. Returns false before menu creation and does not create it. Not equivalent to ContextMenuEnabled.

IsMiddleMousePasteEnabledbool
# IsMiddleMousePasteEnabled
C#
public bool IsMiddleMousePasteEnabled();

Allows middle-mouse paste through the primary-selection clipboard on supporting platforms. Does not add primary-clipboard support or control ordinary Paste. false disables this input path but does not block programmatic PastePrimaryClipboard. Assigning the property inserts nothing.

Returns bool

The corresponding setting, not the presence of clipboard data or platform support.

IsMouseOverSelectionbool
# IsMouseOverSelection
C#
public bool IsMouseOverSelection(bool edges, int caretIndex = -1);

Tests whether the current mouse position is inside the specified caret’s selection; -1 checks all. edges includes boundaries. Converts the mouse position into line/column coordinates rather than accepting an arbitrary position. Use GetSelectionAtLineColumn for a supplied text position.

Parameters
NameTypeDefault
edgesbool—
caretIndexint-1
edges

Include selection boundaries.

caretIndex

Caret index; -1 checks all selections.

Returns bool

Tests whether the current mouse position is inside the specified caret’s selection; -1 checks all. edges includes boundaries. Converts the mouse position into line/column coordinates rather than accepting an arbitrary position. Use GetSelectionAtLineColumn for a supplied text position.

IsMoveCaretOnRightClickEnabledbool
# IsMoveCaretOnRightClickEnabled
C#
public bool IsMoveCaretOnRightClickEnabled();

Allows moving the caret by right-clicking. Assigning this property does not move it or enable the context menu; configure ContextMenuEnabled separately.

Returns bool

Current CaretMoveOnRightClick setting; does not prove the effect is visible in this frame.

IsMultipleCaretsEnabledbool
# IsMultipleCaretsEnabled
C#
public bool IsMultipleCaretsEnabled();

Allows multiple carets. false immediately removes secondary carets, resets multicaret-edit state and blocks AddCaret. Do not toggle this setting inside BeginMulticaretEdit/EndMulticaretEdit.

Returns bool

Allows multiple carets. false immediately removes secondary carets, resets multicaret-edit state and blocks AddCaret. Do not toggle this setting inside BeginMulticaretEdit/EndMulticaretEdit.

IsOvertypeModeEnabledbool
# IsOvertypeModeEnabled
C#
public bool IsOvertypeModeEnabled();

Whether user-input overtype mode is enabled. Does not mean that every programmatic setter removes old characters.

Returns bool

Whether user-input overtype mode is enabled. Does not mean that every programmatic setter removes old characters.

IsScrollPastEndOfFileEnabledbool
# IsScrollPastEndOfFileEnabled
C#
public bool IsScrollPastEndOfFileEnabled();

Allows extra scrolling space beyond text end. Does not add empty document lines or increase GetLineCount.

Returns bool

Allows extra scrolling space beyond text end. Does not add empty document lines or increase GetLineCount.

IsSelectingEnabledbool
# IsSelectingEnabled
C#
public bool IsSelectingEnabled();

Allows text selection. Disabling clears existing selections but does not block caret movement through Select or make the document read-only. Configure Editable separately.

Returns bool

Allows text selection. Disabling clears existing selections but does not block caret movement through Select or make the document read-only. Configure Editable separately.

IsSelectionHandleEnabledbool
# IsSelectionHandleEnabled
C#
public bool IsSelectionHandleEnabled();

Enables on-screen selection handles for touch input. Does not enable selection itself; configure SelectingEnabled separately. Does not control the number of carets or replace CaretMultiple.

Returns bool

Current SelectionHandleEnabled setting; does not prove the effect is visible in this frame.

IsShortcutKeysEnabledbool
# IsShortcutKeysEnabled
C#
public bool IsShortcutKeysEnabled();

Enables built-in editing-command shortcuts and their context-menu accelerator labels. Does not disable all keyboard input or block programmatic commands. Use Editable false to prevent user text editing.

Returns bool

Enables built-in editing-command shortcuts and their context-menu accelerator labels. Does not disable all keyboard input or block programmatic commands. Use Editable false to prevent user text editing.

IsSmoothScrollEnabledbool
# IsSmoothScrollEnabled
C#
public bool IsSmoothScrollEnabled();

Enables smooth vertical scrolling. Does not change ScrollVertical units or guarantee animation for every programmatic SetVScroll.

Returns bool

Enables smooth vertical scrolling. Does not change ScrollVertical units or guarantee animation for every programmatic SetVScroll.

IsVirtualKeyboardEnabledbool
# IsVirtualKeyboardEnabled
C#
public bool IsVirtualKeyboardEnabled();

Allows the on-screen keyboard when supported by the current platform. Assigning true does not itself open it. VirtualKeyboardShowOnFocus separately controls opening on focus; editing requires Editable. Does not build a custom keyboard from UI controls.

Returns bool

Allows the on-screen keyboard when supported by the current platform. Assigning true does not itself open it. VirtualKeyboardShowOnFocus separately controls opening on focus; editing requires Editable. Does not build a custom keyboard from UI controls.

MenuOptionvoid
# MenuOption
C#
public void MenuOption(int option);

Executes a built-in MenuItems command ID supplied as int; this is an ID, not a PopupMenu row index. Does not open the menu. ContextMenuEnabled false does not block the call. The Clear command respects Editable, unlike direct Clear; direction commands change presentation while retaining Text. A disabled menu item is not a substitute for checking your programmatic command’s prerequisites.

Parameters
NameTypeDefault
optionint—
option

Numeric built-in command ID, for example (int)TextEdit.MenuItems.SelectAll. Not a PopupMenu index.

MergeGuttersvoid
# MergeGutters
C#
public void MergeGutters(int fromLine, int toLine);

Selectively copies fromLine data to toLine for Overwritable gutters only. Nonempty text and an existing icon replace destination values and copy their color; empty text and a null icon do not clear old values. Metadata is skipped only for an empty string: nil can overwrite the destination. Per-line clickable true propagates, while false does not clear an existing true. Retains source data and document text; not a line move or deep container copy.

Parameters
NameTypeDefault
fromLineint—
toLineint—
fromLine

Source line whose data remains in place.

toLine

Destination line for selective copying.

MergeOverlappingCaretsvoid
# MergeOverlappingCarets
C#
public void MergeOverlappingCarets();

Merges coincident carets and overlapping selections. Adjacent nonempty selections that only touch remain separate. Can remove carets and change indices; inside a multicaret edit, defers merging until its end.

MulticaretEditIgnoreCaretbool
# MulticaretEditIgnoreCaret
C#
public bool MulticaretEditIgnoreCaret(int caretIndex);

Whether an index is marked ignored in the current multicaret edit. Check during manual iteration to avoid processing a caret already affected by another edit. The outer EndMulticaretEdit clears the list.

Parameters
NameTypeDefault
caretIndexint—
caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

Returns bool

Whether an index is marked ignored in the current multicaret edit. Check during manual iteration to avoid processing a caret already affected by another edit. The outer EndMulticaretEdit clears the list.

Pastevoid
# Paste
C#
public void Paste(int caretIndex = -1);

The default implementation replaces selections with system clipboard text; an empty clipboard or Editable false changes nothing. With caretIndex -1 and multiple carets, an exactly equal number of clipboard lines is distributed one per caret in document order; otherwise each receives the entire text. A trailing newline creates an additional empty fragment for this count. With one unselected caret and this TextEdit’s retained full-line-copy marker, unchanged copied text is inserted at the current line start. Edits are grouped for Undo. _Paste replaces this behavior.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Existing caret index; -1 means all.

PastePrimaryClipboardvoid
# PastePrimaryClipboard
C#
public void PastePrimaryClipboard(int caretIndex = -1);

The default implementation inserts from the separate primary-selection clipboard when supported by the platform and Editable is enabled. This is not Paste’s regular system clipboard. With one caret, first clears the selection and moves the caret to the mouse, even when the buffer is empty. With multiple carets, the current implementation validates caretIndex but inserts at all carets: the argument does not select the target. Requests focus after a supported call. _PastePrimaryClipboard replaces this behavior; use explicitly obtained text with InsertTextAtCaret for a specific caret.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Validated, but the default implementation does not use it to select the insertion target.

Redovoid
# Redo
C#
public void Redo();

Reapplies an undone operation/group. Requires Editable true and HasRedo. A new edit after Undo can discard the previous Redo branch.

RemoveCaretvoid
# RemoveCaret
C#
public void RemoveCaret(int caret);

Removes the caret at its current index provided at least one remains. Later indices shift. The only remaining caret cannot be removed; use RemoveSecondaryCarets to reset additional carets.

Parameters
NameTypeDefault
caretint—
caret

Current caret index rather than a persistent identifier.

RemoveGuttervoid
# RemoveGutter
C#
public void RemoveGutter(int gutter);

Removes the gutter definition and its data from every line. Later indices decrease; recompute retained indices. Emits GutterRemoved without arguments and does not remove document text.

Parameters
NameTypeDefault
gutterint—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

RemoveLineAtvoid
# RemoveLineAt
C#
public void RemoveLineAt(int line, bool moveCaretsDown = true);

Removes a logical line with the appropriate separator. For the only line, clears content while retaining one empty line. moveCaretsDown chooses where affected carets move; boundaries use a valid nearest position. The operation is undoable.

Parameters
NameTypeDefault
lineint—
moveCaretsDownbooltrue
line

Existing logical-line index from 0 through GetLineCount() - 1.

moveCaretsDown

Move affected carets toward the next line; false prefers the previous line. Boundaries use a valid position.

RemoveSecondaryCaretsvoid
# RemoveSecondaryCarets
C#
public void RemoveSecondaryCarets();

Removes all carets except current index 0. Retains text and the remaining caret’s state; not equivalent to deselecting everything.

RemoveTextvoid
# RemoveText
C#
public void RemoveText(int fromLine, int fromColumn, int toLine, int toColumn);

Removes [fromLine/fromColumn, toLine/toColumn), including intervening line separators. The end boundary is exclusive; cross-line removal joins the retained parts. Columns are Unicode code points. Undoable and does not require Editable true.

Parameters
NameTypeDefault
fromLineint—
fromColumnint—
toLineint—
toColumnint—
fromLine

Removal start line; in LinesEditedFrom, the first reported bound, which can exceed the second.

fromColumn

Removal start column in Unicode code points, inclusive.

toLine

Removal end line; in LinesEditedFrom, the second reported bound.

toColumn

End column in Unicode code points; this position itself is excluded.

SearchVector2I
# Search
C#
public Vector2I Search(string text, uint flags, int fromLine, int fromColumn);

Searches literal text within logical lines. flags 0 ignores case; combine MatchCase, WholeWords and Backwards as uint. Includes the starting position and wraps around the document. Returns Vector2I with X as the Unicode code-point column and Y as the line; no match is (-1, -1). Does not select the result or move the caret. Does not support regex or matches across line separators. When enumerating, advance the start and stop when the first match position repeats.

Parameters
NameTypeDefault
textstring—
flagsuint—
fromLineint—
fromColumnint—
text

Literal query/insertion text. Search supports neither regex nor multiline queries.

flags

MatchCase, WholeWords and Backwards bits as uint; 0 searches forward ignoring case.

fromLine

Existing logical line; in Search, the traversal start line.

fromColumn

Search-start column in Unicode code points, inclusive.

Returns Vector2I

Searches literal text within logical lines. flags 0 ignores case; combine MatchCase, WholeWords and Backwards as uint. Includes the starting position and wraps around the document. Returns Vector2I with X as the Unicode code-point column and Y as the line; no match is (-1, -1). Does not select the result or move the caret. Does not support regex or matches across line separators. When enumerating, advance the start and stop when the first match position repeats.

Selectvoid
# Select
C#
public void Select(int originLine, int originColumn, int caretLine, int caretColumn, int caretIndex = 0);

Sets a selection from origin to the caret position, retaining direction. GetSelectionFrom/To provide normalized bounds; lines and columns start at 0 and columns count Unicode code points. Even with SelectingEnabled false, moves the caret without activating selection. Does not edit text or automatically merge overlapping carets.

Parameters
NameTypeDefault
originLineint—
originColumnint—
caretLineint—
caretColumnint—
caretIndexint0
originLine

Logical selection-anchor line.

originColumn

Anchor column in Unicode code points.

caretLine

Active selection-end line; can precede the anchor.

caretColumn

Active endpoint column in Unicode code points.

caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

SelectAllvoid
# SelectAll
C#
public void SelectAll();

Selects the entire document with the main caret and removes secondary carets. Does not edit text. With SelectingEnabled false, selects nothing; an empty document remains unselected.

SelectWordUnderCaretvoid
# SelectWordUnderCaret
C#
public void SelectWordUnderCaret(int caretIndex = -1);

Toggles selection at the specified caret: clears an existing selection, otherwise selects the word using text-system boundaries and separator settings. caretIndex -1 processes every caret. Requires SelectingEnabled. Does not edit text; overlapping carets are merged. It is not an unconditional select-word command: calling it again clears the selection.

Parameters
NameTypeDefault
caretIndexint-1
caretIndex

Caret index; -1 processes all carets.

SetAutowrapModevoid
# SetAutowrapMode
C#
public void SetAutowrapMode(TextServer.AutowrapMode autowrapMode);

Visual wrapping rule with WrapMode.Boundary: Arbitrary uses grapheme boundaries, Word uses words, WordSmart can split an oversized word, and Off disables soft wrapping. Does not enable Boundary by itself.

Parameters
NameTypeDefault
autowrapModeTextServer.AutowrapMode—
autowrapMode

Off, Arbitrary, Word or WordSmart. Used with Boundary.

SetBackspaceDeletesCompositeCharacterEnabledvoid
# SetBackspaceDeletesCompositeCharacterEnabled
C#
public void SetBackspaceDeletesCompositeCharacterEnabled(bool enable);

With true, normal Backspace deletes to the previous composite-character boundary; false deletes one code point. CaretMidGrapheme true takes priority and also selects one-code-point deletion. Does not control RemoveText with an explicit range.

Parameters
NameTypeDefault
enablebool—
enable

Enable the corresponding composite-deletion setting.

SetCaretBlinkEnabledvoid
# SetCaretBlinkEnabled
C#
public void SetCaretBlinkEnabled(bool enable);

Enables text-caret blinking. The timer runs while focused; false disables blinking rather than hiding the caret. Visibility still depends on focus and other drawing conditions. Configure timing with CaretBlinkInterval.

Parameters
NameTypeDefault
enablebool—
enable

Enable the described behavior; does not change Text content.

SetCaretBlinkIntervalvoid
# SetCaretBlinkInterval
C#
public void SetCaretBlinkInterval(float interval);

Positive caret-visibility toggle interval in seconds. For example, 0.5 toggles every half second; a complete visible/hidden cycle takes two intervals. Zero does not disable blinking: use CaretBlink false. This is not a key-repeat delay.

Parameters
NameTypeDefault
intervalfloat—
interval

Visibility-toggle interval in seconds, strictly greater than zero.

SetCaretColumnvoid
# SetCaretColumn
C#
public void SetCaretColumn(int column, bool adjustViewport = true, int caretIndex = 0);

Moves the caret within its current line, clamped to 0 through the Unicode code-point length. Matching the anchor clears selection. adjustViewport controls scrolling rather than the column value.

Parameters
NameTypeDefault
columnint—
adjustViewportbooltrue
caretIndexint0
column

Column in Unicode code points rather than a UTF-16 index.

adjustViewport

Scroll to the new position if needed.

caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

SetCaretLinevoid
# SetCaretLine
C#
public void SetCaretLine(int line, bool adjustViewport = true, bool canBeHidden = true, int wrapIndex = 0, int caretIndex = 0);

Moves the caret to a logical line, clamping to the document. wrapIndex >= 0 retains visual X within a chosen wrap; -1 retains the numeric column clamped to line length. Set the line, then SetCaretColumn for an exact position. canBeHidden false searches for a visible line.

Parameters
NameTypeDefault
lineint—
adjustViewportbooltrue
canBeHiddenbooltrue
wrapIndexint0
caretIndexint0
line

Zero-based logical line.

adjustViewport

Scroll to the new position if needed.

canBeHidden

Allow a hidden line; false searches for a suitable visible line.

wrapIndex

Visual wrap used to retain X; -1 uses the numeric column.

caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

SetCaretMidGraphemeEnabledvoid
# SetCaretMidGraphemeEnabled
C#
public void SetCaretMidGraphemeEnabled(bool enabled);

Allows caret/deletion behavior inside composite characters. With true, Backspace deletes one code point even if BackspaceDeletesCompositeCharacterEnabled is enabled. Does not mean operating on halves of a UTF-16 surrogate pair.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the input/presentation setting; does not automatically convert text.

SetCaretTypevoid
# SetCaretType
C#
public void SetCaretType(TextEdit.CaretTypeEnum type);

Text-caret shape: Line or Block. Block changes drawing but does not enable character replacement: configure OvertypeMode separately. Does not change text or caret positions.

Parameters
NameTypeDefault
typeTextEdit.CaretTypeEnum—
type

Line or Block shape; does not enable OvertypeMode.

SetContextMenuEnabledvoid
# SetContextMenuEnabled
C#
public void SetContextMenuEnabled(bool enabled);

Allows the user to open the built-in context menu. false neither deletes the PopupMenu nor prevents programmatic GetMenu or MenuOption calls. This is an interface setting, not an editing restriction; use Editable to control input.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described interface behavior.

SetCustomWordSeparatorsvoid
# SetCustomWordSeparators
C#
public void SetCustomWordSeparators(string customWordSeparators);

Additional word-separator characters for the editor’s text system. Assigning the string does not enable them; use UseCustomWordSeparators. Not a regex and does not change the fixed WholeWords boundary checks in Search.

Parameters
NameTypeDefault
customWordSeparatorsstring—
customWordSeparators

Additional separator characters rather than a regular expression.

SetDeselectOnFocusLossEnabledvoid
# SetDeselectOnFocusLossEnabled
C#
public void SetDeselectOnFocusLossEnabled(bool enable);

Controls deselection on focus loss. false retains selection when another control receives focus. Switching false to true while this editor is unfocused immediately clears an existing selection. Does not edit text or transfer focus.

Parameters
NameTypeDefault
enablebool—
enable

Enable deselection on focus loss; enabling while unfocused clears selection immediately.

SetDragAndDropSelectionEnabledvoid
# SetDragAndDropSelectionEnabled
C#
public void SetDragAndDropSelectionEnabled(bool enable);

Allows the user to drag selected text through TextEdit’s drag-and-drop handling. Does not create a selection, perform a transfer on assignment or automatically enable file/project-object drops. Selection separately requires SelectingEnabled.

Parameters
NameTypeDefault
enablebool—
enable

Enable the described behavior; does not change Text content.

SetDrawCaretWhenEditableDisabledvoid
# SetDrawCaretWhenEditableDisabled
C#
public void SetDrawCaretWhenEditableDisabled(bool enable);

Allows caret drawing with Editable false, subject to the remaining visibility conditions. Does not allow input or make the control editable. Leave false for ordinary text viewing without a caret.

Parameters
NameTypeDefault
enablebool—
enable

Enable the described behavior; does not change Text content.

SetDrawControlCharsvoid
# SetDrawControlChars
C#
public void SetDrawControlChars(bool enabled);

Allows the text system to display control characters. Does not remove them from the document or sanitize/validate input text.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the input/presentation setting; does not automatically convert text.

SetDrawMinimapvoid
# SetDrawMinimap
C#
public void SetDrawMinimap(bool enabled);

Shows the document minimap. It takes part of TextEdit’s width, so enabling it can change the number of display rows when wrapping is enabled. Source Text and logical line count remain unchanged. Set its width with MinimapWidth.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described behavior; does not change Text content.

SetDrawSpacesvoid
# SetDrawSpaces
C#
public void SetDrawSpaces(bool enabled);

Shows space markers without changing Text or selection rules. Presentation rather than adding characters to a file.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the input/presentation setting; does not automatically convert text.

SetDrawTabsvoid
# SetDrawTabs
C#
public void SetDrawTabs(bool enabled);

Shows visual tab markers while retaining document text. Does not enable Tab input or convert tabs into spaces.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the input/presentation setting; does not automatically convert text.

SetEditablevoid
# SetEditable
C#
public void SetEditable(bool enabled);

Allows user editing; default true. false also blocks Undo/Redo actions, but not programmatic Text, SetLine, InsertTextAtCaret or RemoveText. This is a UI mode rather than model-data protection.

Parameters
NameTypeDefault
enabledbool—
enabled

Allow user editing and Undo/Redo actions.

SetEmojiMenuEnabledvoid
# SetEmojiMenuEnabled
C#
public void SetEmojiMenuEnabled(bool enable);

Allows the context-menu emoji command when the platform supports a system picker. false disables the corresponding item rather than necessarily removing it. Editable is also required. Does not add an emoji font or guarantee a system picker on every platform.

Parameters
NameTypeDefault
enablebool—
enable

Enable the described interface behavior.

SetEmptySelectionClipboardEnabledvoid
# SetEmptySelectionClipboardEnabled
C#
public void SetEmptySelectionClipboardEnabled(bool enabled);

Allows default Copy and Cut to operate on full lines when no text is selected. Defaults to true. Does not mean copying an empty string: it copies the entire caret line, which Cut may remove. Does not affect selected-text handling; assigning the property does not access the clipboard.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described behavior; assignment itself neither reads nor changes the clipboard.

SetFitContentHeightEnabledvoid
# SetFitContentHeightEnabled
C#
public void SetFitContentHeightEnabled(bool enabled);

Includes content in TextEdit’s minimum height. A parent container may expand the editor instead of using internal scrolling. Does not set a fixed height or change font size. Corresponds to ScrollFitContentHeight.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described interface behavior.

SetFitContentWidthEnabledvoid
# SetFitContentWidthEnabled
C#
public void SetFitContentWidthEnabled(bool enabled);

Includes content in TextEdit’s minimum width. A layout requirement rather than fixed width or text zoom; account for interaction with wrapping. Corresponds to ScrollFitContentWidth.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described interface behavior.

SetGutterClickablevoid
# SetGutterClickable
C#
public void SetGutterClickable(int gutter, bool clickable);

Sets the global action hint for the hover cursor. A line’s visual clickability is the OR of global and per-line flags. false does not itself block GutterClicked; validate the action in the handler.

Parameters
NameTypeDefault
gutterint—
clickablebool—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

clickable

Action hint for the hover cursor rather than a press-signal filter.

SetGutterCustomDrawvoid
# SetGutterCustomDraw
C#
public void SetGutterCustomDraw(int column, Callable drawCallback);

Assigns a Callable for a Custom gutter, receiving logical line, gutter index and a Rect2 in editor-local coordinates. The C# column parameter here means a gutter index. Does not enable Custom type or immediately invoke the callback; default(Callable) clears it. Do not mutate document structure during drawing.

Parameters
NameTypeDefault
columnint—
drawCallbackCallable—
column

Gutter index despite the column name; not a text column.

drawCallback

Callable accepting line, gutter and Rect2; default clears the callback.

SetGutterDrawvoid
# SetGutterDraw
C#
public void SetGutterDraw(int gutter, bool draw);

Shows or hides a gutter while retaining its definition and line data. Hidden gutters are excluded from hit-testing and the main width sum; shared padding can remain. Use RemoveGutter to remove data.

Parameters
NameTypeDefault
gutterint—
drawbool—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

draw

Draw the gutter; false retains its data.

SetGutterNamevoid
# SetGutterName
C#
public void SetGutterName(int gutter, string name);

Sets a gutter name for application identification. Names need not be unique; the setter does not migrate bindings or protect retained indices from shifts. Enforce uniqueness in the application model if needed.

Parameters
NameTypeDefault
gutterint—
namestring—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

name

Definition name; uniqueness is controlled by the application.

SetGutterOverwritablevoid
# SetGutterOverwritable
C#
public void SetGutterOverwritable(int gutter, bool overwritable);

Allows MergeGutters to copy this gutter’s data between lines. Does not make document text read-only or restrict direct SetLineGutter methods.

Parameters
NameTypeDefault
gutterint—
overwritablebool—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

overwritable

Allow the gutter to participate in MergeGutters.

SetGutterTypevoid
# SetGutterType
C#
public void SetGutterType(int gutter, TextEdit.GutterType type);

Chooses cell presentation: String, Icon or Custom. Changing type retains text, icon and Metadata without converting one value into another. Assign a callback separately for Custom.

Parameters
NameTypeDefault
gutterint—
typeTextEdit.GutterType—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

type

String, Icon or Custom: presentation of stored data.

SetGutterWidthvoid
# SetGutterWidth
C#
public void SetGutterWidth(int gutter, int width);

Sets gutter width in pixels. Use nonnegative values; this is a stored width rather than automatic fitting to text or icons. Hidden gutter widths are excluded from the main sum.

Parameters
NameTypeDefault
gutterint—
widthint—
gutter

Current gutter index from 0 through GetGutterCount() - 1.

width

Nonnegative gutter width in pixels.

SetHScrollvoid
# SetHScroll
C#
public void SetHScroll(int value);

Horizontal offset in pixels. Clamped to the internal scrollbar range; wrapping can eliminate the available horizontal range. Not a text column number.

Parameters
NameTypeDefault
valueint—
value

Horizontal pixel offset.

SetHighlightAllOccurrencesvoid
# SetHighlightAllOccurrences
C#
public void SetHighlightAllOccurrences(bool enabled);

Highlights case-sensitive whole-word matches of caret 0’s selected text. Empty or whitespace-only selections are ignored. Creates no additional selections and does not set SetSearchText. Differs from AddSelectionForNextOccurrence, which allows substring matches.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described behavior; does not change Text content.

SetHighlightCurrentLinevoid
# SetHighlightCurrentLine
C#
public void SetHighlightCurrentLine(bool enabled);

Highlights the background of current caret lines using the theme color. This is visual highlighting rather than text selection: HasSelection and GetSelectedText are unchanged. Use Select for an explicit range.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described behavior; does not change Text content.

SetIndentWrappedLinesvoid
# SetIndentWrappedLines
C#
public void SetIndentWrappedLines(bool enabled);

Adds visual indentation to wrapped continuations. Does not insert spaces/tabs or change text or logical line numbers.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable visual continuation indentation without editing text.

SetLanguagevoid
# SetLanguage
C#
public void SetLanguage(string language);

Text-shaping language hint, such as ar; an empty string uses the locale. Does not translate the document or switch application language. Changes shaping/glyph selection while retaining Text.

Parameters
NameTypeDefault
languagestring—
language

Text-shaping language hint; an empty string uses the locale.

SetLinevoid
# SetLine
C#
public void SetLine(int line, string newText);

Replaces a logical line with undo history. newText can contain \n and create additional lines; not limited to replacing one visual row. Programmatic calls are not blocked by Editable false.

Parameters
NameTypeDefault
lineint—
newTextstring—
line

Logical-line index from 0 through GetLineCount() - 1.

newText

New line text; can contain \n and increase the line count.

SetLineAsCenterVisiblevoid
# SetLineAsCenterVisible
C#
public void SetLineAsCenterVisible(int line, int wrapIndex = 0);

Attempts to center the supplied logical line/wrapIndex. Exact centering can be impossible near document boundaries. Does not alter text or carets.

Parameters
NameTypeDefault
lineint—
wrapIndexint0
line

Logical-line index from 0 through GetLineCount() - 1.

wrapIndex

Visual segment index; GetLineWidth uses -1 for the line buffer.

SetLineAsFirstVisiblevoid
# SetLineAsFirstVisible
C#
public void SetLineAsFirstVisible(int line, int wrapIndex = 0);

Scrolls the supplied logical line/wrapIndex toward the top boundary. Does not select text or move carets. Scrollbar range can constrain placement near document end.

Parameters
NameTypeDefault
lineint—
wrapIndexint0
line

Logical-line index from 0 through GetLineCount() - 1.

wrapIndex

Visual segment index; GetLineWidth uses -1 for the line buffer.

SetLineAsLastVisiblevoid
# SetLineAsLastVisible
C#
public void SetLineAsLastVisible(int line, int wrapIndex = 0);

Scrolls the supplied logical line/wrapIndex toward the bottom boundary using viewport height and available range. Does not move the line within the document.

Parameters
NameTypeDefault
lineint—
wrapIndexint0
line

Logical-line index from 0 through GetLineCount() - 1.

wrapIndex

Visual segment index; GetLineWidth uses -1 for the line buffer.

SetLineBackgroundColorvoid
# SetLineBackgroundColor
C#
public void SetLineBackgroundColor(int line, Color color);

Sets an additional background for a logical line, including its visual wraps. Alpha 0 removes this fill while retaining selection and theme styling. Does not edit text or a gutter-cell color.

Parameters
NameTypeDefault
lineint—
colorColor—
line

Logical-line index from 0 through GetLineCount() - 1.

color

Color with alpha; for line backgrounds, alpha 0 removes the additional fill.

SetLineGutterClickablevoid
# SetLineGutterClickable
C#
public void SetLineGutterClickable(int line, int gutter, bool clickable);

Sets a per-line action hint for the hover cursor. Effective visual clickability is ORed with global GutterClickable. Does not block GutterClicked; decide whether to execute the command in the handler.

Parameters
NameTypeDefault
lineint—
gutterint—
clickablebool—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

clickable

Action hint for the hover cursor rather than a press-signal filter.

SetLineGutterIconvoid
# SetLineGutterIcon
C#
public void SetLineGutterIcon(int line, int gutter, Texture2D icon);

Sets a shared Texture2D for the cell; null clears the icon. GutterType.Icon is required to display it. Does not change the label, gutter type or image resource itself.

Parameters
NameTypeDefault
lineint—
gutterint—
iconTexture2D—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

icon

Shared Texture2D or null to clear the icon.

SetLineGutterItemColorvoid
# SetLineGutterItemColor
C#
public void SetLineGutterItemColor(int line, int gutter, Color color);

Sets a cell text/icon color, including alpha. Does not change the line background, document text or other gutter cells.

Parameters
NameTypeDefault
lineint—
gutterint—
colorColor—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

color

Color with alpha; for line backgrounds, alpha 0 removes the additional fill.

SetLineGutterMetadatavoid
# SetLineGutterMetadata
C#
public void SetLineGutterMetadata(int line, int gutter, Variant metadata);

Stores a cell Variant, such as a stable model key. Arrays, dictionaries and resources are retained by reference without deep copying. Line and gutter indices can change after structural edits; do not use them as persistent record IDs.

Parameters
NameTypeDefault
lineint—
gutterint—
metadataVariant—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

metadata

Variant holding model data; containers are not deep-copied.

SetLineGutterTextvoid
# SetLineGutterText
C#
public void SetLineGutterText(int line, int gutter, string text);

Sets a logical line’s gutter-cell label. Does not edit document text, the gutter name or type. Use String type to display the label.

Parameters
NameTypeDefault
lineint—
gutterint—
textstring—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

text

Gutter-cell label, separate from document text.

SetLineWrappingModevoid
# SetLineWrappingMode
C#
public void SetLineWrappingMode(TextEdit.LineWrappingMode mode);

None disables visual wrapping; Boundary constrains lines to available control width. AutowrapMode chooses break points. Does not insert line separators or change GetLineCount; gutters, scrollbar, theme and minimap also affect available width.

Parameters
NameTypeDefault
modeTextEdit.LineWrappingMode—
mode

None or Boundary; configure break-point policy separately.

SetMiddleMousePasteEnabledvoid
# SetMiddleMousePasteEnabled
C#
public void SetMiddleMousePasteEnabled(bool enabled);

Allows middle-mouse paste through the primary-selection clipboard on supporting platforms. Does not add primary-clipboard support or control ordinary Paste. false disables this input path but does not block programmatic PastePrimaryClipboard. Assigning the property inserts nothing.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described behavior; assignment itself neither reads nor changes the clipboard.

SetMinimapWidthvoid
# SetMinimapWidth
C#
public void SetMinimapWidth(int width);

Minimap area width in control pixels. Use a nonnegative value that leaves room for the main text. This is not a minimap font scale. Changing it recalculates available wrap width; use MinimapDraw false to disable the minimap.

Parameters
NameTypeDefault
widthint—
width

Nonnegative minimap width in control pixels.

SetMoveCaretOnRightClickEnabledvoid
# SetMoveCaretOnRightClickEnabled
C#
public void SetMoveCaretOnRightClickEnabled(bool enable);

Allows moving the caret by right-clicking. Assigning this property does not move it or enable the context menu; configure ContextMenuEnabled separately.

Parameters
NameTypeDefault
enablebool—
enable

Enable the described behavior; does not change Text content.

SetMultipleCaretsEnabledvoid
# SetMultipleCaretsEnabled
C#
public void SetMultipleCaretsEnabled(bool enabled);

Allows multiple carets. false immediately removes secondary carets, resets multicaret-edit state and blocks AddCaret. Do not toggle this setting inside BeginMulticaretEdit/EndMulticaretEdit.

Parameters
NameTypeDefault
enabledbool—
enabled

Allow multiple carets; disabling removes secondary carets.

SetOvertypeModeEnabledvoid
# SetOvertypeModeEnabled
C#
public void SetOvertypeModeEnabled(bool enabled);

Enables replacing the next code point in the user-input path when no selection exists. Does not change programmatic InsertTextAtCaret: it continues to insert. Use an explicit removal range for precise replacement from code.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the input/presentation setting; does not automatically convert text.

SetPlaceholdervoid
# SetPlaceholder
C#
public void SetPlaceholder(string text);

Empty-editor hint, separate from Text. GetPlaceholder returns the source string; presentation uses UI translation. Not part of document saving, searching or content history.

Parameters
NameTypeDefault
textstring—
text

Source hint for an empty editor, separate from the document.

SetScrollPastEndOfFileEnabledvoid
# SetScrollPastEndOfFileEnabled
C#
public void SetScrollPastEndOfFileEnabled(bool enable);

Allows extra scrolling space beyond text end. Does not add empty document lines or increase GetLineCount.

Parameters
NameTypeDefault
enablebool—
enable

Enable the corresponding smoothness or past-end-space setting.

SetSearchFlagsvoid
# SetSearchFlags
C#
public void SetSearchFlags(uint flags);

Sets visual search-highlight flags. Does not replace flags explicitly passed to Search or start a search. Call QueueRedraw after changing them. Backwards controls Search traversal rather than highlight drawing order.

Parameters
NameTypeDefault
flagsuint—
flags

MatchCase/WholeWords visual-highlight flags; Backwards controls direction only in Search.

SetSearchTextvoid
# SetSearchText
C#
public void SetSearchText(string searchText);

Sets the visual search-highlight text without executing Search or changing selection. An empty string disables highlighting. The setter does not request redraw; call QueueRedraw after changing settings.

Parameters
NameTypeDefault
searchTextstring—
searchText

Visual highlight text; an empty string clears highlighting.

SetSelectingEnabledvoid
# SetSelectingEnabled
C#
public void SetSelectingEnabled(bool enable);

Allows text selection. Disabling clears existing selections but does not block caret movement through Select or make the document read-only. Configure Editable separately.

Parameters
NameTypeDefault
enablebool—
enable

Allow selection; disabling clears existing selections.

SetSelectionHandleEnabledvoid
# SetSelectionHandleEnabled
C#
public void SetSelectionHandleEnabled(bool enable);

Enables on-screen selection handles for touch input. Does not enable selection itself; configure SelectingEnabled separately. Does not control the number of carets or replace CaretMultiple.

Parameters
NameTypeDefault
enablebool—
enable

Enable the described behavior; does not change Text content.

SetSelectionMode2 overloads
# SetSelectionMode · 1/2
C#
public void SetSelectionMode(TextEdit.SelectionMode mode);

Sets the selection-processing mode. Does not move the caret, create a selection or clear one. Use Select for a range and Deselect to clear it; Word mode alone does not select a word. The overload with line, column and caretIndex ignores those three arguments; use the mode-only overload.

Parameters
NameTypeDefault
modeTextEdit.SelectionMode—
mode

Selection-processing mode; assigning it does not select text.

# SetSelectionMode · 2/2
C#
public void SetSelectionMode(TextEdit.SelectionMode mode, int line, int column, int caretIndex);

Sets the selection-processing mode. Does not move the caret, create a selection or clear one. Use Select for a range and Deselect to clear it; Word mode alone does not select a word. The overload with line, column and caretIndex ignores those three arguments; use the mode-only overload.

Parameters
NameTypeDefault
modeTextEdit.SelectionMode—
lineint—
columnint—
caretIndexint—
mode

Selection-processing mode; assigning it does not select text.

line

Ignored by this overload; use SetSelectionMode(mode).

column

Ignored by this overload; use SetSelectionMode(mode).

caretIndex

Ignored by this overload; use SetSelectionMode(mode).

SetSelectionOriginColumnvoid
# SetSelectionOriginColumn
C#
public void SetSelectionOriginColumn(int column, int caretIndex = 0);

Moves the anchor column within its line. Columns count Unicode code points. Matching the caret clears selection; the setter does not itself activate selection.

Parameters
NameTypeDefault
columnint—
caretIndexint0
column

Column in Unicode code points rather than a UTF-16 index.

caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

SetSelectionOriginLinevoid
# SetSelectionOriginLine
C#
public void SetSelectionOriginLine(int line, bool canBeHidden = true, int wrapIndex = -1, int caretIndex = 0);

Moves the specified caret’s anchor to a logical line, clamped to the document. Does not itself create an active selection; use Select to define both endpoints. canBeHidden and wrapIndex control hidden-line targeting and visual-position retention.

Parameters
NameTypeDefault
lineint—
canBeHiddenbooltrue
wrapIndexint-1
caretIndexint0
line

Zero-based logical line.

canBeHidden

Allow a hidden line; false searches for a suitable visible line.

wrapIndex

Visual wrap used to retain X; -1 uses the numeric column.

caretIndex

Current caret index; -1 is allowed only by methods explicitly documenting all-caret behavior.

SetShortcutKeysEnabledvoid
# SetShortcutKeysEnabled
C#
public void SetShortcutKeysEnabled(bool enabled);

Enables built-in editing-command shortcuts and their context-menu accelerator labels. Does not disable all keyboard input or block programmatic commands. Use Editable false to prevent user text editing.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described interface behavior.

SetSmoothScrollEnabledvoid
# SetSmoothScrollEnabled
C#
public void SetSmoothScrollEnabled(bool enable);

Enables smooth vertical scrolling. Does not change ScrollVertical units or guarantee animation for every programmatic SetVScroll.

Parameters
NameTypeDefault
enablebool—
enable

Enable the corresponding smoothness or past-end-space setting.

SetStructuredTextBidiOverridevoid
# SetStructuredTextBidiOverride
C#
public void SetStructuredTextBidiOverride(TextServer.StructuredTextParser parser);

Structured-text parser for mixed LTR/RTL: URI, path, email, list and other supported modes. Controls separator presentation rather than converting document encoding. Configure parser options separately.

Parameters
NameTypeDefault
parserTextServer.StructuredTextParser—
parser

Structured-text BiDi parser mode.

SetStructuredTextBidiOverrideOptionsvoid
# SetStructuredTextBidiOverrideOptions
C#
public void SetStructuredTextBidiOverrideOptions(Reckfell.Collections.Array args);

Shared Array of BiDi parser options. The setter compares contents and skips equal values; merely assigning Duplicate with old contents does not detach the previous array. In-place mutation does not trigger text recalculation. Supply a separately prepared array and a new array with changed contents when updating.

Parameters
NameTypeDefault
argsReckfell.Collections.Array—
args

Shared parser-options Array; do not mutate it in place after assignment.

SetSyntaxHighlightervoid
# SetSyntaxHighlighter
C#
public void SetSyntaxHighlighter(SyntaxHighlighter syntaxHighlighter);

This editor’s highlighting resource; null disables highlighting. Use one instance per TextEdit because the resource stores only one context. Reassigning the same resource is skipped and does not replace ClearHighlightingCache/EmitChanged.

Parameters
NameTypeDefault
syntaxHighlighterSyntaxHighlighter—
syntaxHighlighter

A separate resource for this editor, or null to disable.

SetTabInputModevoid
# SetTabInputMode
C#
public void SetTabInputMode(bool enabled);

Controls editor handling of the Tab key. Does not convert existing tab characters, set their width or automatically translate indentation to spaces.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the input/presentation setting; does not automatically convert text.

SetTabSizevoid
# SetTabSize
C#
public void SetTabSize(int size);

Sets a positive tab width for layout and indentation measurement. Does not replace tabs with spaces or change Text. Must be greater than 0.

Parameters
NameTypeDefault
sizeint—
size

Positive tab width.

SetTextvoid
# SetText
C#
public void SetText(string text);

Full text with \n line separators. Assignment replaces the document, emits TextSet without TextChanged and allows Undo with history enabled. For a newly loaded document, explicitly clear history and mark the saved version afterward.

Parameters
NameTypeDefault
textstring—
text

Text to insert or assign; \n creates logical lines.

SetTextDirectionvoid
# SetTextDirection
C#
public void SetTextDirection(Control.TextDirection direction);

Base text direction: Inherited follows Control layout, Auto derives it from text, and Ltr/Rtl set it explicitly. Does not translate or reverse stored Text. Document character order remains logical.

Parameters
NameTypeDefault
directionControl.TextDirection—
direction

Inherited, Auto, Ltr or Rtl without changing source-text order.

SetTooltipRequestFuncvoid
# SetTooltipRequestFunc
C#
public void SetTooltipRequestFunc(Callable callback);

Sets a (string word) -> string callback for the tooltip of a word under the pointer. Assignment stores the handler without immediately invoking it. An empty Callable restores standard Control handling. Does not edit text, search or mean a tooltip is already visible. Keep the handler valid while installed.

Parameters
NameTypeDefault
callbackCallable—
callback

A (string word) -> string handler; an empty Callable clears it.

SetUseCustomWordSeparatorsvoid
# SetUseCustomWordSeparators
C#
public void SetUseCustomWordSeparators(bool enabled);

Enables CustomWordSeparators for word-boundary processing. Independent of UseDefaultWordSeparators; both sets can be used together. Does not switch Search into WholeWords mode.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the corresponding separator set independently of the other set.

SetUseDefaultWordSeparatorsvoid
# SetUseDefaultWordSeparators
C#
public void SetUseDefaultWordSeparators(bool enabled);

Enables the text system’s default word separators. Disabling does not enable custom separators automatically; configure UseCustomWordSeparators separately. Does not change Search WholeWords boundary checks.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the corresponding separator set independently of the other set.

SetVScrollvoid
# SetVScroll
C#
public void SetVScroll(double value);

Vertical offset in visual-row units, allowing a fractional part. Not pixels or always a logical line number: use GetScrollPosForLine with wrapping. The getter returns the actual clamped value.

Parameters
NameTypeDefault
valuedouble—
value

Vertical offset in visual rows; fractional values are allowed.

SetVScrollSpeedvoid
# SetVScrollSpeed
C#
public void SetVScrollSpeed(float speed);

Smooth vertical scrolling speed, at least 1. Does not set the current offset or represent line height or a horizontal step size.

Parameters
NameTypeDefault
speedfloat—
speed

Smooth vertical scroll speed, at least 1.

SetVirtualKeyboardEnabledvoid
# SetVirtualKeyboardEnabled
C#
public void SetVirtualKeyboardEnabled(bool enabled);

Allows the on-screen keyboard when supported by the current platform. Assigning true does not itself open it. VirtualKeyboardShowOnFocus separately controls opening on focus; editing requires Editable. Does not build a custom keyboard from UI controls.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the described interface behavior.

SetVirtualKeyboardShowOnFocusvoid
# SetVirtualKeyboardShowOnFocus
C#
public void SetVirtualKeyboardShowOnFocus(bool showOnFocus);

Allows requesting the on-screen keyboard on focus. Requires VirtualKeyboardEnabled, Editable and platform support. false disables focus-triggered opening rather than every other keyboard-opening path.

Parameters
NameTypeDefault
showOnFocusbool—
showOnFocus

Allow requesting the on-screen keyboard on focus.

SkipSelectionForNextOccurrencevoid
# SkipSelectionForNextOccurrence
C#
public void SkipSelectionForNextOccurrence();

Moves the last indexed selection to the next match while retaining earlier carets. Without a selection, jumps to the start of the next word match without selecting it. Requires SelectingEnabled; enable CaretMultiple before calling: otherwise the command may only clear the selection without moving the caret. Search is literal, case-sensitive, allows substrings and wraps.

StartActionvoid
# StartAction
C#
public void StartAction(TextEdit.EditAction action);

Starts/continues a Typing, Backspace or Delete action group for user-edit history. None ends the current action group. For an ordinary command containing several programmatic edits, prefer BeginComplexOperation/EndComplexOperation with try/finally.

Parameters
NameTypeDefault
actionTextEdit.EditAction—
action

Typing, Backspace or Delete; None closes the action group.

SwapLinesvoid
# SwapLines
C#
public void SwapLines(int fromLine, int toLine);

Swaps the text of two existing logical lines and moves associated caret/anchor positions. One Undo operation; equal indices change nothing. Does not sort the whole document.

Parameters
NameTypeDefault
fromLineint—
toLineint—
fromLine

Existing logical line; in Search, the traversal start line.

toLine

Second existing line to swap.

TagSavedVersionvoid
# TagSavedVersion
C#
public void TagSavedVersion();

Marks the current GetVersion as saved. Does not write a file; call after a successful application save or after loading a new document and clearing its history.

Undovoid
# Undo
C#
public void Undo();

Undoes the last operation or BeginComplexOperation group. Does nothing with Editable false even when HasUndo is true. Restores text and caret state from history.

_Backspacevoid
# _Backspace
C#
public virtual void _Backspace(int caretIndex);

Hook replacing Backspace. Invoked before the default Editable check, so enforce it yourself when needed. Do not call Backspace from this hook: it invokes the same hook again. The base C# body is empty; base._Backspace does not perform default deletion.

Parameters
NameTypeDefault
caretIndexint—
caretIndex

Caret index; Backspace uses -1 for the entire eligible set.

_Copyvoid
# _Copy
C#
public virtual void _Copy(int caretIndex);

Overridable Copy handler, called instead of the built-in implementation before its validation and clipboard operations. Implement the required index, Editable and platform checks yourself. The base C# method is empty: base._Copy does not run the default command. Do not call Copy from the handler to continue: it invokes the same handler again.

Parameters
NameTypeDefault
caretIndexint—
caretIndex

Index supplied by the command; -1 means all carets. The custom handler is responsible for validation.

_Cutvoid
# _Cut
C#
public virtual void _Cut(int caretIndex);

Overridable Cut handler, called instead of the built-in implementation before its validation and clipboard operations. Implement the required index, Editable and platform checks yourself. The base C# method is empty: base._Cut does not run the default command. Do not call Cut from the handler to continue: it invokes the same handler again.

Parameters
NameTypeDefault
caretIndexint—
caretIndex

Index supplied by the command; -1 means all carets. The custom handler is responsible for validation.

_HandleUnicodeInputvoid
# _HandleUnicodeInput
C#
public virtual void _HandleUnicodeInput(int unicodeChar, int caretIndex);

Hook processing one Unicode input code point and caret index. Not a C# char containing half a surrogate pair. An override replaces the default insertion/overtype path; explicitly handle Editable, selection and overtype. Do not invoke the hook manually instead of ordinary InsertTextAtCaret.

Parameters
NameTypeDefault
unicodeCharint—
caretIndexint—
unicodeChar

One Unicode code point rather than a separate UTF-16 half of an emoji.

caretIndex

Caret index; Backspace uses -1 for the entire eligible set.

_Pastevoid
# _Paste
C#
public virtual void _Paste(int caretIndex);

Overridable Paste handler, called instead of the built-in implementation before its validation and clipboard operations. Implement the required index, Editable and platform checks yourself. The base C# method is empty: base._Paste does not run the default command. Do not call Paste from the handler to continue: it invokes the same handler again.

Parameters
NameTypeDefault
caretIndexint—
caretIndex

Index supplied by the command; -1 means all carets. The custom handler is responsible for validation.

_PastePrimaryClipboardvoid
# _PastePrimaryClipboard
C#
public virtual void _PastePrimaryClipboard(int caretIndex);

Overridable PastePrimaryClipboard handler, called instead of the built-in implementation before its validation and clipboard operations. Implement the required index, Editable and platform checks yourself. The base C# method is empty: base._PastePrimaryClipboard does not run the default command. Do not call PastePrimaryClipboard from the handler to continue: it invokes the same handler again.

Parameters
NameTypeDefault
caretIndexint—
caretIndex

Index supplied by the command; -1 means all carets. The custom handler is responsible for validation.

Signals and events7

CaretChangedEvent
# CaretChanged
C#
public event Action CaretChanged;

Deferred notification of caret-position changes. Not a universal signal for every selection change: anchor-only changes can occur without it. Also synchronize the model after your own programmatic operations.

GutterAddedEvent
# GutterAdded
C#
public event Action GutterAdded;

A gutter was added; no index argument. Definitions and line data are already updated. Recompute retained indices from the application model after insertion.

GutterClickedEvent
# GutterClicked
C#
public event TextEdit.GutterClickedEventHandler GutterClicked;

Press/touch on a drawn gutter, reporting the logical line and gutter index. Clickable flags are hover hints and do not guarantee signal filtering; check whether the action is allowed for this cell. Does not automatically toggle a breakpoint or save data.

Handler parameters
NameTypeDefault
linelong—
gutterlong—
line

Logical-line index from 0 through GetLineCount() - 1.

gutter

Current gutter index from 0 through GetGutterCount() - 1.

GutterRemovedEvent
# GutterRemoved
C#
public event Action GutterRemoved;

A gutter was removed; no index argument. Later gutter indices have already shifted. Does not mean that a document line was removed.

LinesEditedFromEvent
# LinesEditedFrom
C#
public event TextEdit.LinesEditedFromEventHandler LinesEditedFrom;

Notification of affected logical lines, including programmatic edits and IME activity. During removal, fromLine can exceed toLine; not a guaranteed sorted range or a file-write event. Normalize bounds and account for the new line count when computing an update range.

Handler parameters
NameTypeDefault
fromLinelong—
toLinelong—
fromLine

Removal start line; in LinesEditedFrom, the first reported bound, which can exceed the second.

toLine

Removal end line; in LinesEditedFrom, the second reported bound.

TextChangedEvent
# TextChanged
C#
public event Action TextChanged;

Deferred text-edit notification; multiple synchronous operations can coalesce into one signal. Read current Text when handling it. Text/SetText assignment and Clear use TextSet and do not themselves create a new TextChanged; an earlier queued notification can still arrive.

TextSetEvent
# TextSet
C#
public event Action TextSet;

Whole text was assigned through Text/SetText or Clear was called. Programmatic assignment is not reported through TextChanged; handle TextSet or explicitly update the model when loading. Does not imply user input or a file save.

TextEdit.CaretTypeEnum

ValueDescription
Block = 1

Block caret.

Line = 0

Vertical line caret.

TextEdit.EditAction

ValueDescription
Backspace = 2

A backwards delete action.

Delete = 3

A forward delete action.

None = 0

No current action.

Typing = 1

A typing action.

TextEdit.GutterType

ValueDescription
Custom = 2

When a gutter is set to custom using TextEdit.SetGutterType, it is used to contain custom visuals controlled by a callback method set via the TextEdit.SetGutterCustomDraw method.

Icon = 1

When a gutter is set to icon using TextEdit.SetGutterType, it is used to contain an icon set via the TextEdit.SetLineGutterIcon method.

String = 0

When a gutter is set to string using TextEdit.SetGutterType, it is used to contain text set via the TextEdit.SetLineGutterText method.

TextEdit.LineWrappingMode

ValueDescription
Boundary = 1

Line wrapping occurs at the control boundary, beyond what would normally be visible.

None = 0

Line wrapping is disabled.

TextEdit.MenuItems

ValueDescription
Clear = 3

Erases the whole TextEdit text.

Copy = 1

Copies the selected text.

Cut = 0

Cuts (copies and clears) the selected text.

DirAuto = 9

Sets text direction to automatic.

DirInherited = 8

Sets text direction to inherited.

DirLtr = 10

Sets text direction to left-to-right.

DirRtl = 11

Sets text direction to right-to-left.

DisplayUcc = 12

Toggles control character display.

EmojiAndSymbol = 30

Opens system emoji and symbol picker.

InsertAlm = 21

Inserts Arabic letter mark (ALM) character.

InsertFsi = 24

Inserts first strong isolate (FSI) character.

InsertLre = 16

Inserts start of left-to-right embedding (LRE) character.

InsertLri = 22

Inserts left-to-right isolate (LRI) character.

InsertLrm = 14

Inserts left-to-right mark (LRM) character.

InsertLro = 18

Inserts start of left-to-right override (LRO) character.

InsertPdf = 20

Inserts pop direction formatting (PDF) character.

InsertPdi = 25

Inserts pop direction isolate (PDI) character.

InsertRle = 17

Inserts start of right-to-left embedding (RLE) character.

InsertRli = 23

Inserts right-to-left isolate (RLI) character.

InsertRlm = 15

Inserts right-to-left mark (RLM) character.

InsertRlo = 19

Inserts start of right-to-left override (RLO) character.

InsertShy = 29

Inserts soft hyphen (SHY) character.

InsertWj = 28

Inserts word joiner (WJ) character.

InsertZwj = 26

Inserts zero width joiner (ZWJ) character.

InsertZwnj = 27

Inserts zero width non-joiner (ZWNJ) character.

Max = 31

Represents the size of the TextEdit.MenuItems enum.

Paste = 2

Pastes the clipboard text over the selected text (or at the cursor's position).

Redo = 6

Redoes the previous action.

SelectAll = 4

Selects the whole TextEdit text.

SubmenuInsertUcc = 13

ID of "Insert Control Character" submenu.

SubmenuTextDir = 7

ID of "Text Writing Direction" submenu.

Undo = 5

Undoes the previous action.

TextEdit.SearchFlags

ValueDescription
Backwards = 4

Search from end to beginning.

MatchCase = 1

Match case when searching.

WholeWords = 2

Match whole words when searching.

TextEdit.SelectionMode

ValueDescription
Line = 4

Select whole lines as if the user triple clicked.

None = 0

Not selecting.

Pointer = 2

Select single characters as if the user single clicked.

Shift = 1

Select as if shift is pressed.

Word = 3

Select whole words as if the user double clicked.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
background_color
Color

Sets the background Color of this TextEdit.

Default: Color(0, 0, 0, 0)
caret_background_color
Color

Color of the text behind the caret when using a block caret.

Default: Color(0, 0, 0, 1)
caret_color
Color

Color of the caret. This can be set to a fully transparent color to hide the caret entirely.

Default: Color(0.875, 0.875, 0.875, 1)
current_line_color
Color

Background Color of the line containing the caret.

Default: Color(0.25, 0.25, 0.26, 0.8)
font_color
Color

Sets the font Color.

Default: Color(0.875, 0.875, 0.875, 1)
font_outline_color
Color

The tint of text outline of the TextEdit.

Default: Color(0, 0, 0, 1)
font_placeholder_color
Color

Font color for TextEdit.PlaceholderText.

Default: Color(0.875, 0.875, 0.875, 0.6)
font_readonly_color
Color

Sets the font Color when TextEdit.Editable is disabled.

Default: Color(0.875, 0.875, 0.875, 0.5)
font_selected_color
Color

Sets the Color of the selected text. If equal to Color(0, 0, 0, 0), it will be ignored.

Default: Color(0, 0, 0, 0)
search_result_border_color
Color

Color of the border around text that matches the search query.

Default: Color(0.3, 0.3, 0.3, 0.4)
search_result_color
Color

Color behind the text that matches the search query.

Default: Color(0.3, 0.3, 0.3, 1)
selection_color
Color

Sets the highlight Color of text selections.

Default: Color(0.5, 0.5, 0.5, 1)
word_highlighted_color
Color

Sets the highlight Color of multiple occurrences. TextEdit.HighlightAllOccurrences has to be enabled.

Default: Color(0.5, 0.5, 0.5, 0.25)
caret_width
int

The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size. If set to 0 or lower, the caret width is automatically set to 1 pixel and multiplied by the display scaling factor.

Default: 1
line_spacing
int

Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.

Default: 4
outline_size
int

The size of the text outline. Note: If using a font with FontFile.MultichannelSignedDistanceField enabled, its FontFile.MsdfPixelRange must be set to at least twice the value of TextEdit.outline_size for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.

Default: 0
wrap_offset
int

Sets an additional margin for line wrapping width.

Default: 10
font
Font

Sets the default Font.

font_size
int

Sets default font size.

space
Texture2D

Sets a custom Texture2D for space text characters.

tab
Texture2D

Sets a custom Texture2D for tab text characters.

caret_move_rejected_sound
AudioStream

Played when a caret is attempted to be moved using the arrow keys, [kbd]Home[/kbd], [kbd]End[/kbd], [kbd]Page Up[/kbd], or [kbd]Page Down[/kbd], but none of the carets actually move since they're already at the beginning/end of the text.

caret_moved_sound
AudioStream

Played when a caret is moved using the arrow keys, [kbd]Home[/kbd], [kbd]End[/kbd], [kbd]Page Up[/kbd], [kbd]Page Down[/kbd], or mouse clicks.

focus_sound
AudioStream

Played when this TextEdit receives keyboard or gamepad-induced focus. Mouse or touch-induced focus does not play a focus sound.

text_change_rejected_sound
AudioStream

Played when a text change is rejected (for instance, when pressing Backspace while there is no text).

text_changed_sound
AudioStream

Played when text is successfully changed through keyboard input (physical or virtual). Calling methods that alter the text programmatically will also play this sound (but not setting the TextEdit.Text property or calling TextEdit.Clear).

focus
StyleBox

Sets the StyleBox when in focus. The TextEdit.focus StyleBox is displayed over the base StyleBox, so a partially transparent StyleBox should be used to ensure the base StyleBox remains visible. A StyleBox that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a StyleBoxEmpty resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.

normal
StyleBox

Sets the StyleBox of this TextEdit.

read_only
StyleBox

Sets the StyleBox of this TextEdit when TextEdit.Editable is disabled.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.