RichTextLabel
Label for text with BBCode, inline objects and effects.
RichTextLabel displays formatted text. For a static string, enable BbcodeEnabled and assign Text; for incremental construction, use Push methods, AddText and Pop. AddText displays brackets/tags literally; AppendText parses BBCode. Do not mix source Text with manual construction without an explicit reset: Text does not become a copy of the resulting content.
The label is neither a code editor nor an HTML browser. Link metadata reaches the application through MetaClicked; its handler performs navigation. Custom effects change glyph drawing rather than source text.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
RichTextLabelConstructor
public RichTextLabel();Creates a rich-text label; add it to a parent with AddChild. Enable BbcodeEnabled to parse Text as BBCode. Does not automatically open files or links.
Properties33
AutowrapModeProperty
public TextServer.AutowrapMode AutowrapMode { get; set; }Wrapping rule for available width: off, arbitrary or word-based. Changes display rows and metrics while retaining source Text. Give the label a layout width for predictable results.
AutowrapTrimFlagsProperty
public TextServer.LineBreakFlag AutowrapTrimFlags { get; set; }Flags for edge-whitespace/indent handling during wrapping. The setter retains only TextServer trim-mask bits; other LineBreakFlag values do not select a separate wrapping mode here. Source text is not trimmed.
BbcodeEnabledProperty
public bool BbcodeEnabled { get; set; }Controls BBCode parsing of the Text property. Does not make manual AddText parse markup; AppendText parses markup independently. Toggling does not guarantee rebuilding a manually modified stack.
ContextMenuEnabledProperty
public bool ContextMenuEnabled { get; set; }Allows opening the built-in user menu. false neither deletes the PopupMenu nor prohibits programmatic GetMenu/MenuOption. An interface setting rather than a restriction on application data copying.
CustomEffectsProperty
public Reckfell.Collections.Array CustomEffects { get; set; }Custom BBCode effect resources. The setter replaces the array and calls ReloadEffects; the getter shares the array, so mutating it does not itself reparse text. Duplicate names are ambiguous: the first matching name is used. Use PushCustomfx for direct programmatic application.
DeselectOnFocusLossEnabledProperty
public bool DeselectOnFocusLossEnabled { get; set; }Allows deselection on focus loss. Switching false to true while unfocused immediately clears an existing selection. Use false to retain it when moving to another control.
DragAndDropSelectionEnabledProperty
public bool DragAndDropSelectionEnabled { get; set; }Allows dragging selected plain text out of the label. Requires SelectionEnabled; does not enable editing or arbitrary file drops. Assignment does not initiate a drag.
FitContentProperty
public bool FitContent { get; set; }Includes content in the label’s minimum size. A parent container may expand it; does not set an exact Size or shrink the font. Account for wrapping and parent constraints.
HintUnderlinedProperty
public bool HintUnderlined { get; set; }Allows visual underlining of PushHint spans. Does not enable/disable tooltip content or edit text.
HorizontalAlignmentProperty
public HorizontalAlignment HorizontalAlignment { get; set; }Default horizontal text alignment; local paragraph formatting may override it. Fill uses JustificationFlags for justification. Does not move the Control in its parent container.
JustificationFlagsProperty
public TextServer.JustificationFlag JustificationFlags { get; set; }Line-stretching rules for justified text, such as word and final-line handling. Work with the corresponding alignment rather than setting label width.
LanguageProperty
public string Language { get; set; }Language hint for text shaping and wrapping. Does not translate the string; UI translation of source Text is a separate mechanism.
MaximumFontSizeProperty
public int MaximumFontSize { get; set; }Upper font-fitting bound with ResizeFontToFit. Keep consistent with MinimumFontSize; constrains fitting rather than universally prohibiting local BBCode font sizes.
MetaUnderlinedProperty
public bool MetaUnderlined { get; set; }Allows underlining metadata spans according to their MetaUnderline policy. Does not create links or open URLs. An explicit PushUnderline span is separate formatting.
MinimumFontSizeProperty
public int MinimumFontSize { get; set; }Lower font-fitting bound with ResizeFontToFit. Supply a positive value no greater than MaximumFontSize. Assignment does not mean this exact size is already drawn.
ProgressBarDelayProperty
public int ProgressBarDelay { get; set; }Delay before displaying background-loading progress, in milliseconds. A positive value waits that interval; zero and negative values disable the indicator. Does not set parsing speed or character-reveal timing.
ResizeFontToFitProperty
public bool ResizeFontToFit { get; set; }Allows choosing a base font size for the available area within MinimumFontSize–MaximumFontSize. Unlike FitContent, adjusts the font rather than the minimum-size requirement. Fitting depends on width and height; a tiny minimum does not ensure legibility.
ScrollActiveProperty
public bool ScrollActive { get; set; }Allows built-in vertical scrolling. Toggling reapplies source Text: when mixed with manual AddText/Push, content may rebuild from the stored string. Set the mode before manual construction. Does not mean all content fits without a scrollbar.
ScrollFollowingProperty
public bool ScrollFollowing { get; set; }Allows following the end of appended text. If the user scrolls upward, actual following can pause until returning to the bottom. The getter reports the setting rather than whether the view is currently at the bottom.
ScrollFollowingVisibleCharactersProperty
public bool ScrollFollowingVisibleCharacters { get; set; }Scrolls to content revealed through VisibleCharacters. Differs from following the full text end; intended for progressive reveal. Setting true may immediately change scrolling.
SelectionEnabledProperty
public bool SelectionEnabled { get; set; }Allows selecting displayed text and using SelectAll. Enabling sets FocusMode.All; disabling clears active selection and switches to accessibility focus mode. Does not make the label editable or change Text.
ShortcutKeysEnabledProperty
public bool ShortcutKeysEnabled { get; set; }Allows the label’s built-in command shortcuts. Does not automatically enable SelectionEnabled or prohibit direct SelectAll/MenuOption calls.
StructuredTextBidiOverrideProperty
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }Selects parsing of structured bidirectional text, such as addresses or paths. A shaping setting rather than a regex replacement of source text. StructuredTextBidiOverrideOptions supplies parameters.
StructuredTextBidiOverrideOptionsProperty
public Reckfell.Collections.Array StructuredTextBidiOverrideOptions { get; set; }Structured BiDi-parser parameters. The array is shared; in-place mutation does not automatically trigger recalculation. Assign a new array with different content to update: the setter may skip equal content.
TabSizeProperty
public int TabSize { get; set; }Default tab width measured in spaces; use a positive value. Changes tab presentation without replacing tabs with spaces in Text. Use TabStops for explicit positions.
TabStopsProperty
public float[] TabStops { get; set; }Explicit tab positions in text-area pixels; supply increasing positive values. C# float[] transfers data and the getter returns values: mutating the result does not reconfigure the label. Does not set source-line indentation.
TextProperty
public string Text { get; set; }Source string for rebuilding the label, including UI translation and BBCode parsing when BbcodeEnabled. Assignment replaces manual content; assigning the same nonempty string may not rebuild it. AddText, AppendText and Push methods do not append their result to this property. Use GetParsedText for resulting plain text.
TextDirectionProperty
public Control.TextDirection TextDirection { get; set; }Text direction for BiDi shaping. Does not manually reverse source characters or translate text. Configure structured-text parsing separately.
ThreadedProperty
public bool Threaded { get; set; }Allows background text layout; defaults to false. Does not make arbitrary RichTextLabel calls thread-safe or move all drawing to another thread. Check IsFinished; until completion, metrics may cover only the processed portion.
VerticalAlignmentProperty
public VerticalAlignment VerticalAlignment { get; set; }Vertical placement of text content inside the label. Does not change Control alignment in its parent or enable automatic scrolling.
VisibleCharactersProperty
public int VisibleCharacters { get; set; }Progressive-reveal limit: -1 shows all, zero hides text, a nonnegative value sets a limit. VisibleCharactersBehavior chooses behavior before/after glyph shaping. Not a frame count or Text’s UTF-16 Length. The setter updates VisibleRatio but does not explicitly clamp oversized values; keep animation values between zero and GetTotalCharacterCount.
VisibleCharactersBehaviorProperty
public TextServer.VisibleCharactersBehavior VisibleCharactersBehavior { get; set; }Chooses whether reveal limits apply before shaping or to shaped characters/glyphs. Before shaping may change layout; after shaping retains full-line context, with reveal units depending on mode. Account for ligatures, composite characters and RTL; do not assume one C# char per visible glyph.
VisibleRatioProperty
public float VisibleRatio { get; set; }Reveal fraction: values from zero to one convert to integer VisibleCharacters by truncation. One or greater shows all; a negative value hides text. Creates no timer: animate the fraction from your application. Refers to the content counter rather than necessarily the number of visually distinct letters.
Methods163
AddHrvoid
public void AddHr(int width = 90, int height = 2, Color? color = default, HorizontalAlignment alignment = HorizontalAlignment.Center, bool widthInPercent = true, bool heightInPercent = false);Adds a horizontal rule as separate paragraph content. Defaults to 90% of available text width and a height of two pixels. A percentage height also uses width rather than label height. The command closes its internal paragraph span: needs no extra Pop.
| Name | Type | Default |
|---|---|---|
width | int | 90 |
height | int | 2 |
color | Color? | default |
alignment | HorizontalAlignment | HorizontalAlignment.Center |
widthInPercent | bool | true |
heightInPercent | bool | false |
widthNonnegative width; defaults to 90 percent.
heightNonnegative height; Percent for images uses available text width.
colorImage modulation or the corresponding decoration color.
alignmentHorizontal rule alignment.
widthInPercentUse percent rather than pixel width.
heightInPercentUse percent rather than pixel height; the percentage base is text width.
AddImage5 overloads
public void AddImage(Texture2D image, int width, int height, Color? color, InlineAlignment inlineAlign, Rect2? region);Adds an inline image from a valid Texture2D with nonzero dimensions. Zero width/height uses natural sizing; specifying one side preserves aspect ratio. Pixel means pixels, Percent means percentages of available text width for both axes, and Em multiplies the current font size (one means one em). Supply a unique key for later updates. Content rather than a Push span: needs no extra Pop. Open a cell first when inside a table.
| Name | Type | Default |
|---|---|---|
image | Texture2D | — |
width | int | — |
height | int | — |
color | Color? | — |
inlineAlign | InlineAlignment | — |
region | Rect2? | — |
imageValid nonzero-sized Texture2D; required in UpdateImage when Texture is selected.
widthNonnegative width in selected units; zero means automatic in AddImage and retain previous in UpdateImage.
heightNonnegative height; Percent for images uses available text width.
colorImage modulation or the corresponding decoration color.
inlineAlignInline object alignment relative to the text row.
regionTexture region in pixels; an empty Rect2 uses the whole texture.
public void AddImage(Texture2D image, int width, int height, Color? color, InlineAlignment inlineAlign, Rect2? region, Variant key, bool pad, string tooltip, bool sizeInPercent);Adds an inline image from a valid Texture2D with nonzero dimensions. Zero width/height uses natural sizing; specifying one side preserves aspect ratio. Pixel means pixels, Percent means percentages of available text width for both axes, and Em multiplies the current font size (one means one em). Supply a unique key for later updates. Content rather than a Push span: needs no extra Pop. Open a cell first when inside a table.
| Name | Type | Default |
|---|---|---|
image | Texture2D | — |
width | int | — |
height | int | — |
color | Color? | — |
inlineAlign | InlineAlignment | — |
region | Rect2? | — |
key | Variant | — |
pad | bool | — |
tooltip | string | — |
sizeInPercent | bool | — |
imageValid nonzero-sized Texture2D; required in UpdateImage when Texture is selected.
widthNonnegative width in selected units; zero means automatic in AddImage and retain previous in UpdateImage.
heightNonnegative height; Percent for images uses available text width.
colorImage modulation or the corresponding decoration color.
inlineAlignInline object alignment relative to the text row.
regionTexture region in pixels; an empty Rect2 uses the whole texture.
keyUnique Variant update key. Equal keys update all matches; nil may match objects without explicit keys.
padCenter the image in the allocated area without upscaling beyond natural size rather than stretching.
tooltipImage tooltip text.
sizeInPercentIn the older overload, true selects percent units on both axes.
public void AddImage(Texture2D image, int width, int height, Color? color, InlineAlignment inlineAlign, Rect2? region, Variant key, bool pad, string tooltip, bool widthInPercent, bool heightInPercent, string altText);Adds an inline image from a valid Texture2D with nonzero dimensions. Zero width/height uses natural sizing; specifying one side preserves aspect ratio. Pixel means pixels, Percent means percentages of available text width for both axes, and Em multiplies the current font size (one means one em). Supply a unique key for later updates. Content rather than a Push span: needs no extra Pop. Open a cell first when inside a table.
| Name | Type | Default |
|---|---|---|
image | Texture2D | — |
width | int | — |
height | int | — |
color | Color? | — |
inlineAlign | InlineAlignment | — |
region | Rect2? | — |
key | Variant | — |
pad | bool | — |
tooltip | string | — |
widthInPercent | bool | — |
heightInPercent | bool | — |
altText | string | — |
imageValid nonzero-sized Texture2D; required in UpdateImage when Texture is selected.
widthNonnegative width in selected units; zero means automatic in AddImage and retain previous in UpdateImage.
heightNonnegative height; Percent for images uses available text width.
colorImage modulation or the corresponding decoration color.
inlineAlignInline object alignment relative to the text row.
regionTexture region in pixels; an empty Rect2 uses the whole texture.
keyUnique Variant update key. Equal keys update all matches; nil may match objects without explicit keys.
padCenter the image in the allocated area without upscaling beyond natural size rather than stretching.
tooltipImage tooltip text.
widthInPercentUse percent rather than pixel width.
heightInPercentUse percent rather than pixel height; the percentage base is text width.
altTextImage description for assistive technology rather than a visible caption.
public void AddImage(Texture2D image, int width, int height, Color? color, InlineAlignment inlineAlign, Rect2? region, Variant key, bool pad, string tooltip, bool sizeInPercent, string altText);Adds an inline image from a valid Texture2D with nonzero dimensions. Zero width/height uses natural sizing; specifying one side preserves aspect ratio. Pixel means pixels, Percent means percentages of available text width for both axes, and Em multiplies the current font size (one means one em). Supply a unique key for later updates. Content rather than a Push span: needs no extra Pop. Open a cell first when inside a table.
| Name | Type | Default |
|---|---|---|
image | Texture2D | — |
width | int | — |
height | int | — |
color | Color? | — |
inlineAlign | InlineAlignment | — |
region | Rect2? | — |
key | Variant | — |
pad | bool | — |
tooltip | string | — |
sizeInPercent | bool | — |
altText | string | — |
imageValid nonzero-sized Texture2D; required in UpdateImage when Texture is selected.
widthNonnegative width in selected units; zero means automatic in AddImage and retain previous in UpdateImage.
heightNonnegative height; Percent for images uses available text width.
colorImage modulation or the corresponding decoration color.
inlineAlignInline object alignment relative to the text row.
regionTexture region in pixels; an empty Rect2 uses the whole texture.
keyUnique Variant update key. Equal keys update all matches; nil may match objects without explicit keys.
padCenter the image in the allocated area without upscaling beyond natural size rather than stretching.
tooltipImage tooltip text.
sizeInPercentIn the older overload, true selects percent units on both axes.
altTextImage description for assistive technology rather than a visible caption.
public void AddImage(Texture2D image, float width = 0f, float height = 0f, Color? color = default, InlineAlignment inlineAlign = InlineAlignment.Center, Rect2? region = default, Variant key = default, bool pad = false, string tooltip = "", RichTextLabel.ImageUnit widthUnit = RichTextLabel.ImageUnit.Pixel, RichTextLabel.ImageUnit heightUnit = RichTextLabel.ImageUnit.Pixel, string altText = "");Adds an inline image from a valid Texture2D with nonzero dimensions. Zero width/height uses natural sizing; specifying one side preserves aspect ratio. Pixel means pixels, Percent means percentages of available text width for both axes, and Em multiplies the current font size (one means one em). Supply a unique key for later updates. Content rather than a Push span: needs no extra Pop. Open a cell first when inside a table.
| Name | Type | Default |
|---|---|---|
image | Texture2D | — |
width | float | 0f |
height | float | 0f |
color | Color? | default |
inlineAlign | InlineAlignment | InlineAlignment.Center |
region | Rect2? | default |
key | Variant | default |
pad | bool | false |
tooltip | string | "" |
widthUnit | RichTextLabel.ImageUnit | RichTextLabel.ImageUnit.Pixel |
heightUnit | RichTextLabel.ImageUnit | RichTextLabel.ImageUnit.Pixel |
altText | string | "" |
imageValid nonzero-sized Texture2D; required in UpdateImage when Texture is selected.
widthNonnegative width in selected units; zero means automatic in AddImage and retain previous in UpdateImage.
heightNonnegative height; Percent for images uses available text width.
colorImage modulation or the corresponding decoration color.
inlineAlignInline object alignment relative to the text row.
regionTexture region in pixels; an empty Rect2 uses the whole texture.
keyUnique Variant update key. Equal keys update all matches; nil may match objects without explicit keys.
padCenter the image in the allocated area without upscaling beyond natural size rather than stretching.
tooltipImage tooltip text.
widthUnitPixel, Percent or Em for width; UpdateImage applies it through the WidthUnit mask.
heightUnitHeight units; Percent uses area width and Em multiplies font size.
altTextImage description for assistive technology rather than a visible caption.
AddTextvoid
public void AddText(string text);Adds literal text in the current formatting span. Square-bracket tags are not parsed. Suitable for user text inside Push/Pop without treating it as markup. Does not update Text; a table needs a cell before adding text directly.
| Name | Type | Default |
|---|---|---|
text | string | — |
textSource or literal text as defined by the method; AddText does not parse tags.
AppendTextvoid
public void AppendText(string bbcode);Parses a BBCode fragment and appends formatted content without a full reset. Does not append the fragment to Text. Use AddText for data intended to display literally. Keep tags balanced; Push/Pop is convenient for programmatic spans.
| Name | Type | Default |
|---|---|---|
bbcode | string | — |
bbcodeBBCode to parse rather than literal text.
Clearvoid
public void Clear();Removes constructed content and formatting spans, resetting selection and current text effects. Retains the stored source Text string; assign Text to an empty string to clear that. Does not clear registered CustomEffects.
Deselectvoid
public void Deselect();Clears current selection without changing text, scrolling or the SelectionEnabled setting.
GetAutowrapModeTextServer.AutowrapMode
public TextServer.AutowrapMode GetAutowrapMode();Wrapping rule for available width: off, arbitrary or word-based. Changes display rows and metrics while retaining source Text. Give the label a layout width for predictable results.
TextServer.AutowrapModeWrapping rule for available width: off, arbitrary or word-based. Changes display rows and metrics while retaining source Text. Give the label a layout width for predictable results.
GetAutowrapTrimFlagsTextServer.LineBreakFlag
public TextServer.LineBreakFlag GetAutowrapTrimFlags();Flags for edge-whitespace/indent handling during wrapping. The setter retains only TextServer trim-mask bits; other LineBreakFlag values do not select a separate wrapping mode here. Source text is not trimmed.
TextServer.LineBreakFlagFlags for edge-whitespace/indent handling during wrapping. The setter retains only TextServer trim-mask bits; other LineBreakFlag values do not select a separate wrapping mode here. Source text is not trimmed.
GetCharacterLineint
public int GetCharacterLine(int character);Returns the display-row index containing a content position, or -1 when not found in calculated data. The character index is not an offset into source BBCode or UTF-16. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
| Name | Type | Default |
|---|---|---|
character | int | — |
characterContent position without tags, not a source Text UTF-16 index.
intReturns the display-row index containing a content position, or -1 when not found in calculated data. The character index is not an offset into source BBCode or UTF-16. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
GetCharacterParagraphint
public int GetCharacterParagraph(int character);Returns a content position’s paragraph index, or -1. A paragraph may contain multiple wrapped display rows. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
| Name | Type | Default |
|---|---|---|
character | int | — |
characterContent position without tags, not a source Text UTF-16 index.
intReturns a content position’s paragraph index, or -1. A paragraph may contain multiple wrapped display rows. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
GetContentHeightint
public int GetContentHeight();Calculated content height in pixels including theme spacing. Not the scroll viewport height. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
intCalculated content height in pixels including theme spacing. Not the scroll viewport height. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
GetContentWidthint
public int GetContentWidth();Calculated content width in control pixels rather than a Control size constraint. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
intCalculated content width in control pixels rather than a Control size constraint. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
GetEffectsReckfell.Collections.Array
public Reckfell.Collections.Array GetEffects();Custom BBCode effect resources. The setter replaces the array and calls ReloadEffects; the getter shares the array, so mutating it does not itself reparse text. Duplicate names are ambiguous: the first matching name is used. Use PushCustomfx for direct programmatic application.
Reckfell.Collections.ArrayCustom BBCode effect resources. The setter replaces the array and calls ReloadEffects; the getter shares the array, so mutating it does not itself reparse text. Duplicate names are ambiguous: the first matching name is used. Use PushCustomfx for direct programmatic application.
GetHorizontalAlignmentHorizontalAlignment
public HorizontalAlignment GetHorizontalAlignment();Default horizontal text alignment; local paragraph formatting may override it. Fill uses JustificationFlags for justification. Does not move the Control in its parent container.
HorizontalAlignmentDefault horizontal text alignment; local paragraph formatting may override it. Fill uses JustificationFlags for justification. Does not move the Control in its parent container.
GetJustificationFlagsTextServer.JustificationFlag
public TextServer.JustificationFlag GetJustificationFlags();Line-stretching rules for justified text, such as word and final-line handling. Work with the corresponding alignment rather than setting label width.
TextServer.JustificationFlagLine-stretching rules for justified text, such as word and final-line handling. Work with the corresponding alignment rather than setting label width.
GetLanguagestring
public string GetLanguage();Language hint for text shaping and wrapping. Does not translate the string; UI translation of source Text is a separate mechanism.
stringLanguage hint for text shaping and wrapping. Does not translate the string; UI translation of source Text is a separate mechanism.
GetLineCountint
public int GetLineCount();Number of calculated display rows in the main flow, including wrapping. Unlike TextEdit, not a file’s logical line count. Depends on width, fonts and reveal mode. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
intNumber of calculated display rows in the main flow, including wrapping. Unlike TextEdit, not a file’s logical line count. Depends on width, fonts and reveal mode. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
GetLineHeightint
public int GetLineHeight(int line);Display-row height: ascent + descent + theme line separation. Formatting can make heights differ between rows. Supply an existing index. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineZero-based wrapped display-row index.
intDisplay-row height: ascent + descent + theme line separation. Formatting can make heights differ between rows. Supply an existing index. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
GetLineOffsetfloat
public float GetLineOffset(int line);Vertical display-row offset within content, in pixels. Neither a global screen position nor a coordinate already adjusted for scrolling. Validate the index first: zero is also a valid first-row offset.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineZero-based wrapped display-row index.
floatVertical display-row offset within content, in pixels. Neither a global screen position nor a coordinate already adjusted for scrolling. Validate the index first: zero is also a valid first-row offset.
GetLineRangeVector2I
public Vector2I GetLineRange(int line);Content-position range for a calculated display row: X start, Y end. Not source-BBCode or UTF-16 indices. Validate zero <= line < GetLineCount first; (0, 0) is not a reliable error sentinel. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineZero-based wrapped display-row index.
Vector2IContent-position range for a calculated display row: X start, Y end. Not source-BBCode or UTF-16 indices. Validate zero <= line < GetLineCount first; (0, 0) is not a reliable error sentinel. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
GetLineWidthint
public int GetLineWidth(int line);Pixel width of an existing calculated display row. Supply an index from zero through GetLineCount() - 1 rather than a paragraph index. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineZero-based wrapped display-row index.
intPixel width of an existing calculated display row. Supply an index from zero through GetLineCount() - 1 rather than a paragraph index. With Threaded, read final metrics after IsFinished; changing text, width or fonts makes them pending again.
GetMaximumFontSizeint
public int GetMaximumFontSize();Upper font-fitting bound with ResizeFontToFit. Keep consistent with MinimumFontSize; constrains fitting rather than universally prohibiting local BBCode font sizes.
intUpper font-fitting bound with ResizeFontToFit. Keep consistent with MinimumFontSize; constrains fitting rather than universally prohibiting local BBCode font sizes.
GetMenuPopupMenu
public PopupMenu GetMenu();Returns the built-in PopupMenu, creating it on first access without showing it. The label owns and frees it; do not Free/Dispose this borrowed reference.
PopupMenuReturns the built-in PopupMenu, creating it on first access without showing it. The label owns and frees it; do not Free/Dispose this borrowed reference.
GetMinimumFontSizeint
public int GetMinimumFontSize();Lower font-fitting bound with ResizeFontToFit. Supply a positive value no greater than MaximumFontSize. Assignment does not mean this exact size is already drawn.
intLower font-fitting bound with ResizeFontToFit. Supply a positive value no greater than MaximumFontSize. Assignment does not mean this exact size is already drawn.
GetParagraphCountint
public int GetParagraphCount();Number of paragraphs in the main content flow. Automatic wrapping within a paragraph does not create another paragraph. Not the number of all display rows or nested table cells.
intNumber of paragraphs in the main content flow. Automatic wrapping within a paragraph does not create another paragraph. Not the number of all display rows or nested table cells.
GetParagraphOffsetfloat
public float GetParagraphOffset(int paragraph);Calculated paragraph’s vertical offset in content pixels. Validate index and readiness; zero can mean either the start or an unavailable result.
| Name | Type | Default |
|---|---|---|
paragraph | int | — |
paragraphZero-based main-flow paragraph index.
floatCalculated paragraph’s vertical offset in content pixels. Validate index and readiness; zero can mean either the start or an unavailable result.
GetParsedTextstring
public string GetParsedText();Returns plain text from constructed content without tags. Inline images become spaces; lists/indents may add tabs. Not a reverse conversion to source BBCode or a copy of Text.
stringReturns plain text from constructed content without tags. Inline images become spaces; lists/indents may add tabs. Not a reverse conversion to source BBCode or a copy of Text.
GetProgressBarDelayint
public int GetProgressBarDelay();Delay before displaying background-loading progress, in milliseconds. A positive value waits that interval; zero and negative values disable the indicator. Does not set parsing speed or character-reveal timing.
intDelay before displaying background-loading progress, in milliseconds. A positive value waits that interval; zero and negative values disable the indicator. Does not set parsing speed or character-reveal timing.
GetRenderedFontSizeint
public int GetRenderedFontSize();Current calculated base-font fitting value. Does not describe every locally formatted span. Disabling fitting resets the cache to zero; do not use zero as a real size when creating another font.
intCurrent calculated base-font fitting value. Does not describe every locally formatted span. Disabling fitting resets the cache to zero; do not use zero as a real size when creating another font.
GetSelectedTextstring
public string GetSelectedText();Returns selected plain text without tags, or an empty string when selection is absent/disabled. Inline images become spaces; tables are traversed as content. Not a slice of source Text containing BBCode.
stringReturns selected plain text without tags, or an empty string when selection is absent/disabled. Inline images become spaces; tables are traversed as content. Not a slice of source Text containing BBCode.
GetSelectionFromint
public int GetSelectionFrom();Returns the active selection’s starting content-model position, or -1. Not a source-BBCode or UTF-16 string index; use GetSelectedText to retrieve text, especially with tables and inline objects.
intReturns the active selection’s starting content-model position, or -1. Not a source-BBCode or UTF-16 string index; use GetSelectedText to retrieve text, especially with tables and inline objects.
GetSelectionLineOffsetfloat
public float GetSelectionLineOffset();Vertical pixel offset of the selection start in content, accounting for wrapping and nested frames. -1 means no suitable selection. Neither a line number nor a global screen coordinate.
floatVertical pixel offset of the selection start in content, accounting for wrapping and nested frames. -1 means no suitable selection. Neither a line number nor a global screen coordinate.
GetSelectionToint
public int GetSelectionTo();Returns the active selection’s inclusive final position, or -1. For an ordinary content range, length is to - from + 1; unlike TextEdit’s exclusive endpoint. Do not use directly as a C# source-string slice index.
intReturns the active selection’s inclusive final position, or -1. For an ordinary content range, length is to - from + 1; unlike TextEdit’s exclusive endpoint. Do not use directly as a C# source-string slice index.
GetStructuredTextBidiOverrideTextServer.StructuredTextParser
public TextServer.StructuredTextParser GetStructuredTextBidiOverride();Selects parsing of structured bidirectional text, such as addresses or paths. A shaping setting rather than a regex replacement of source text. StructuredTextBidiOverrideOptions supplies parameters.
TextServer.StructuredTextParserSelects parsing of structured bidirectional text, such as addresses or paths. A shaping setting rather than a regex replacement of source text. StructuredTextBidiOverrideOptions supplies parameters.
GetStructuredTextBidiOverrideOptionsReckfell.Collections.Array
public Reckfell.Collections.Array GetStructuredTextBidiOverrideOptions();Structured BiDi-parser parameters. The array is shared; in-place mutation does not automatically trigger recalculation. Assign a new array with different content to update: the setter may skip equal content.
Reckfell.Collections.ArrayStructured BiDi-parser parameters. The array is shared; in-place mutation does not automatically trigger recalculation. Assign a new array with different content to update: the setter may skip equal content.
GetTabSizeint
public int GetTabSize();Default tab width measured in spaces; use a positive value. Changes tab presentation without replacing tabs with spaces in Text. Use TabStops for explicit positions.
intDefault tab width measured in spaces; use a positive value. Changes tab presentation without replacing tabs with spaces in Text. Use TabStops for explicit positions.
GetTabStopsfloat[]
public float[] GetTabStops();Explicit tab positions in text-area pixels; supply increasing positive values. C# float[] transfers data and the getter returns values: mutating the result does not reconfigure the label. Does not set source-line indentation.
float[]Explicit tab positions in text-area pixels; supply increasing positive values. C# float[] transfers data and the getter returns values: mutating the result does not reconfigure the label. Does not set source-line indentation.
GetTextstring
public string GetText();Source string for rebuilding the label, including UI translation and BBCode parsing when BbcodeEnabled. Assignment replaces manual content; assigning the same nonempty string may not rebuild it. AddText, AppendText and Push methods do not append their result to this property. Use GetParsedText for resulting plain text.
stringSource string for rebuilding the label, including UI translation and BBCode parsing when BbcodeEnabled. Assignment replaces manual content; assigning the same nonempty string may not rebuild it. AddText, AppendText and Push methods do not append their result to this property. Use GetParsedText for resulting plain text.
GetTextDirectionControl.TextDirection
public Control.TextDirection GetTextDirection();Text direction for BiDi shaping. Does not manually reverse source characters or translate text. Configure structured-text parsing separately.
Control.TextDirectionText direction for BiDi shaping. Does not manually reverse source characters or translate text. Configure structured-text parsing separately.
GetTotalCharacterCountint
public int GetTotalCharacterCount();Counts content without BBCode tags: text code points, line breaks and one position per inline image. Not Text.Length, glyph count or the number of already visible letters. Use as a reveal limit rather than a source-BBCode slice index.
intCounts content without BBCode tags: text code points, line breaks and one position per inline image. Not Text.Length, glyph count or the number of already visible letters. Use as a reveal limit rather than a source-BBCode slice index.
GetVScrollBarVScrollBar
public VScrollBar GetVScrollBar();Returns the label-owned VScrollBar. Do not Free/Dispose it or reparent it. Its value uses content pixels; the usable range accounts for the scrollbar page size.
VScrollBarReturns the label-owned VScrollBar. Do not Free/Dispose it or reparent it. Its value uses content pixels; the usable range accounts for the scrollbar page size.
GetVerticalAlignmentVerticalAlignment
public VerticalAlignment GetVerticalAlignment();Vertical placement of text content inside the label. Does not change Control alignment in its parent or enable automatic scrolling.
VerticalAlignmentVertical placement of text content inside the label. Does not change Control alignment in its parent or enable automatic scrolling.
GetVisibleCharactersint
public int GetVisibleCharacters();Progressive-reveal limit: -1 shows all, zero hides text, a nonnegative value sets a limit. VisibleCharactersBehavior chooses behavior before/after glyph shaping. Not a frame count or Text’s UTF-16 Length. The setter updates VisibleRatio but does not explicitly clamp oversized values; keep animation values between zero and GetTotalCharacterCount.
intProgressive-reveal limit: -1 shows all, zero hides text, a nonnegative value sets a limit. VisibleCharactersBehavior chooses behavior before/after glyph shaping. Not a frame count or Text’s UTF-16 Length. The setter updates VisibleRatio but does not explicitly clamp oversized values; keep animation values between zero and GetTotalCharacterCount.
GetVisibleCharactersBehaviorTextServer.VisibleCharactersBehavior
public TextServer.VisibleCharactersBehavior GetVisibleCharactersBehavior();Chooses whether reveal limits apply before shaping or to shaped characters/glyphs. Before shaping may change layout; after shaping retains full-line context, with reveal units depending on mode. Account for ligatures, composite characters and RTL; do not assume one C# char per visible glyph.
TextServer.VisibleCharactersBehaviorChooses whether reveal limits apply before shaping or to shaped characters/glyphs. Before shaping may change layout; after shaping retains full-line context, with reveal units depending on mode. Account for ligatures, composite characters and RTL; do not assume one C# char per visible glyph.
GetVisibleContentRectRect2I
public Rect2I GetVisibleContentRect();Cached rectangle of drawn visible content in label coordinates. Neither full content size nor a screen rectangle. Before an updated draw, may be empty or belong to the previous frame; IsFinished alone does not update this cache.
Rect2ICached rectangle of drawn visible content in label coordinates. Neither full content size nor a screen rectangle. Before an updated draw, may be empty or belong to the previous frame; IsFinished alone does not update this cache.
GetVisibleLineCountint
public int GetVisibleLineCount();Visible-row count from drawing results. Neither viewport row capacity nor total GetLineCount. Returns zero when Visible is false; after text/size changes, wait for an updated frame. IsFinished confirms calculation, not that a new frame exists.
intVisible-row count from drawing results. Neither viewport row capacity nor total GetLineCount. Returns zero when Visible is false; after text/size changes, wait for an updated frame. IsFinished confirms calculation, not that a new frame exists.
GetVisibleParagraphCountint
public int GetVisibleParagraphCount();Visible paragraph count from drawing, not wrapped row count. Requires a frame after content/scroll changes for a current result; returns zero when Visible is false.
intVisible paragraph count from drawing, not wrapped row count. Requires a frame after content/scroll changes for a current result; returns zero when Visible is false.
GetVisibleRatiofloat
public float GetVisibleRatio();Reveal fraction: values from zero to one convert to integer VisibleCharacters by truncation. One or greater shows all; a negative value hides text. Creates no timer: animate the fraction from your application. Refers to the content counter rather than necessarily the number of visually distinct letters.
floatReveal fraction: values from zero to one convert to integer VisibleCharacters by truncation. One or greater shows all; a negative value hides text. Creates no timer: animate the fraction from your application. Refers to the content counter rather than necessarily the number of visually distinct letters.
InstallEffectvoid
public void InstallEffect(Variant effect);Appends a RichTextEffect resource to registered effects and calls ReloadEffects. Does not automatically replace an existing resource with the same tag name. The effect script defines its BBCode name; use PushCustomfx to bypass name lookup.
| Name | Type | Default |
|---|---|---|
effect | Variant | — |
effectValid RichTextEffect resource.
InvalidateParagraphbool
public bool InvalidateParagraph(int paragraph);Marks shaping, sizing and font caches stale starting at the supplied paragraph. Does not remove it, change Text or fully reparse BBCode. true means an accepted index rather than completed recalculation; test IsFinished separately.
| Name | Type | Default |
|---|---|---|
paragraph | int | — |
paragraphMain-flow paragraph index from zero through GetParagraphCount() - 1.
boolMarks shaping, sizing and font caches stale starting at the supplied paragraph. Does not remove it, change Text or fully reparse BBCode. true means an accepted index rather than completed recalculation; test IsFinished separately.
IsContextMenuEnabledbool
public bool IsContextMenuEnabled();Allows opening the built-in user menu. false neither deletes the PopupMenu nor prohibits programmatic GetMenu/MenuOption. An interface setting rather than a restriction on application data copying.
boolAllows opening the built-in user menu. false neither deletes the PopupMenu nor prohibits programmatic GetMenu/MenuOption. An interface setting rather than a restriction on application data copying.
IsDeselectOnFocusLossEnabledbool
public bool IsDeselectOnFocusLossEnabled();Allows deselection on focus loss. Switching false to true while unfocused immediately clears an existing selection. Use false to retain it when moving to another control.
boolAllows deselection on focus loss. Switching false to true while unfocused immediately clears an existing selection. Use false to retain it when moving to another control.
IsDragAndDropSelectionEnabledbool
public bool IsDragAndDropSelectionEnabled();Allows dragging selected plain text out of the label. Requires SelectionEnabled; does not enable editing or arbitrary file drops. Assignment does not initiate a drag.
boolAllows dragging selected plain text out of the label. Requires SelectionEnabled; does not enable editing or arbitrary file drops. Assignment does not initiate a drag.
IsFinishedbool
public bool IsFinished();Tests whether current shaping, sizing and font calculations are complete. The query may itself initiate cache updates; neither a blocking wait nor a test of VisibleCharacters animation completion. When subscribing to Finished, account for text that may already be ready.
boolTests whether current shaping, sizing and font calculations are complete. The query may itself initiate cache updates; neither a blocking wait nor a test of VisibleCharacters animation completion. When subscribing to Finished, account for text that may already be ready.
IsFitContentEnabledbool
public bool IsFitContentEnabled();Includes content in the label’s minimum size. A parent container may expand it; does not set an exact Size or shrink the font. Account for wrapping and parent constraints.
boolIncludes content in the label’s minimum size. A parent container may expand it; does not set an exact Size or shrink the font. Account for wrapping and parent constraints.
IsHintUnderlinedbool
public bool IsHintUnderlined();Allows visual underlining of PushHint spans. Does not enable/disable tooltip content or edit text.
boolAllows visual underlining of PushHint spans. Does not enable/disable tooltip content or edit text.
IsMenuVisiblebool
public bool IsMenuVisible();Tests the existing menu’s actual visibility without creating it. false before creation does not mean ContextMenuEnabled is disabled.
boolTests the existing menu’s actual visibility without creating it. false before creation does not mean ContextMenuEnabled is disabled.
IsMetaUnderlinedbool
public bool IsMetaUnderlined();Allows underlining metadata spans according to their MetaUnderline policy. Does not create links or open URLs. An explicit PushUnderline span is separate formatting.
boolAllows underlining metadata spans according to their MetaUnderline policy. Does not create links or open URLs. An explicit PushUnderline span is separate formatting.
IsReadybool · Deprecated
public bool IsReady();Obsolete alias for IsFinished. Use IsFinished; this concerns layout readiness rather than entity lifecycle readiness or entering the tree.
boolObsolete alias for IsFinished. Use IsFinished; this concerns layout readiness rather than entity lifecycle readiness or entering the tree.
IsResizeFontToFitEnabledbool
public bool IsResizeFontToFitEnabled();Allows choosing a base font size for the available area within MinimumFontSize–MaximumFontSize. Unlike FitContent, adjusts the font rather than the minimum-size requirement. Fitting depends on width and height; a tiny minimum does not ensure legibility.
boolAllows choosing a base font size for the available area within MinimumFontSize–MaximumFontSize. Unlike FitContent, adjusts the font rather than the minimum-size requirement. Fitting depends on width and height; a tiny minimum does not ensure legibility.
IsScrollActivebool
public bool IsScrollActive();Allows built-in vertical scrolling. Toggling reapplies source Text: when mixed with manual AddText/Push, content may rebuild from the stored string. Set the mode before manual construction. Does not mean all content fits without a scrollbar.
boolAllows built-in vertical scrolling. Toggling reapplies source Text: when mixed with manual AddText/Push, content may rebuild from the stored string. Set the mode before manual construction. Does not mean all content fits without a scrollbar.
IsScrollFollowingbool
public bool IsScrollFollowing();Allows following the end of appended text. If the user scrolls upward, actual following can pause until returning to the bottom. The getter reports the setting rather than whether the view is currently at the bottom.
boolAllows following the end of appended text. If the user scrolls upward, actual following can pause until returning to the bottom. The getter reports the setting rather than whether the view is currently at the bottom.
IsScrollFollowingVisibleCharactersbool
public bool IsScrollFollowingVisibleCharacters();Scrolls to content revealed through VisibleCharacters. Differs from following the full text end; intended for progressive reveal. Setting true may immediately change scrolling.
boolScrolls to content revealed through VisibleCharacters. Differs from following the full text end; intended for progressive reveal. Setting true may immediately change scrolling.
IsSelectionEnabledbool
public bool IsSelectionEnabled();Allows selecting displayed text and using SelectAll. Enabling sets FocusMode.All; disabling clears active selection and switches to accessibility focus mode. Does not make the label editable or change Text.
boolAllows selecting displayed text and using SelectAll. Enabling sets FocusMode.All; disabling clears active selection and switches to accessibility focus mode. Does not make the label editable or change Text.
IsShortcutKeysEnabledbool
public bool IsShortcutKeysEnabled();Allows the label’s built-in command shortcuts. Does not automatically enable SelectionEnabled or prohibit direct SelectAll/MenuOption calls.
boolAllows the label’s built-in command shortcuts. Does not automatically enable SelectionEnabled or prohibit direct SelectAll/MenuOption calls.
IsThreadedbool
public bool IsThreaded();Allows background text layout; defaults to false. Does not make arbitrary RichTextLabel calls thread-safe or move all drawing to another thread. Check IsFinished; until completion, metrics may cover only the processed portion.
boolAllows background text layout; defaults to false. Does not make arbitrary RichTextLabel calls thread-safe or move all drawing to another thread. Check IsFinished; until completion, metrics may cover only the processed portion.
IsUsingBbcodebool
public bool IsUsingBbcode();Controls BBCode parsing of the Text property. Does not make manual AddText parse markup; AppendText parses markup independently. Toggling does not guarantee rebuilding a manually modified stack.
boolControls BBCode parsing of the Text property. Does not make manual AddText parse markup; AppendText parses markup independently. Toggling does not guarantee rebuilding a manually modified stack.
MenuOptionvoid
public void MenuOption(int option);Executes an int MenuItems command ID rather than a menu row index. Copy copies selected text or, when empty, all GetParsedText even if SelectionEnabled is disabled. SelectAll requires selection permission. Does not open the menu; ContextMenuEnabled does not block a direct call.
| Name | Type | Default |
|---|---|---|
option | int | — |
optionNumeric MenuItems command ID, not a PopupMenu index.
Newlinevoid
public void Newline();Adds an explicit newline to constructed content and starts the next paragraph in the current frame. Does not update source Text; not automatic width-based wrapping.
ParseBbcodevoid
public void ParseBbcode(string bbcode);Clears the displayed content and parses the supplied markup. A full parse rather than AppendText appending. Does not assign Text; set Text with BbcodeEnabled to retain the source string.
| Name | Type | Default |
|---|---|---|
bbcode | string | — |
bbcodeBBCode to parse rather than literal text.
ParseExpressionsForValues2 overloads
public Reckfell.Collections.Dictionary ParseExpressionsForValues(ReadOnlySpan<string> expressions);Parses key=value parameters without executing code or mathematical expressions. Recognizes exact true/false, numbers, #RGB/#RRGGBB and $path as EntityPath; other values remain strings. Comma-separated values become an Array. An invalid number of = signs returns the Dictionary accumulated so far. Array and Span overloads use the same parser; do not assume arbitrary whitespace trimming.
| Name | Type | Default |
|---|---|---|
expressions | ReadOnlySpan<string> | — |
expressionskey=value parameters; commas separate values.
Reckfell.Collections.DictionaryParses key=value parameters without executing code or mathematical expressions. Recognizes exact true/false, numbers, #RGB/#RRGGBB and $path as EntityPath; other values remain strings. Comma-separated values become an Array. An invalid number of = signs returns the Dictionary accumulated so far. Array and Span overloads use the same parser; do not assume arbitrary whitespace trimming.
public Reckfell.Collections.Dictionary ParseExpressionsForValues(string[] expressions);Parses key=value parameters without executing code or mathematical expressions. Recognizes exact true/false, numbers, #RGB/#RRGGBB and $path as EntityPath; other values remain strings. Comma-separated values become an Array. An invalid number of = signs returns the Dictionary accumulated so far. Array and Span overloads use the same parser; do not assume arbitrary whitespace trimming.
| Name | Type | Default |
|---|---|---|
expressions | string[] | — |
expressionskey=value parameters; commas separate values.
Reckfell.Collections.DictionaryParses key=value parameters without executing code or mathematical expressions. Recognizes exact true/false, numbers, #RGB/#RRGGBB and $path as EntityPath; other values remain strings. Comma-separated values become an Array. An invalid number of = signs returns the Dictionary accumulated so far. Array and Span overloads use the same parser; do not assume arbitrary whitespace trimming.
Popvoid
public void Pop();Closes one current formatting span while retaining its content. Call only after a corresponding Push: the root has no parent. Does not delete the last character.
PopAllvoid
public void PopAll();Returns the current construction span to the root without removing content. Resets the construction position rather than clearing text or reliably repairing malformed BBCode.
PopContextvoid
public void PopContext();Leaves nested spans through the nearest PushContext boundary. Without one, ascends to the root. Retains text already added.
PushBgcolorvoid
public void PushBgcolor(Color bgcolor);Opens a rectangular background-color span behind text rather than changing glyph color through PushColor. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
bgcolor | Color | — |
bgcolorFill color behind text.
PushBoldvoid
public void PushBold();Opens a theme bold-font span; combines with active italics. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
PushBoldItalicsvoid
public void PushBoldItalics();Opens a theme bold-italic font span. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
PushCellvoid
public void PushCell();Opens the next cell only when the current span is a table. Apply SetCell settings immediately, then add text/formatting; Pop returns to the table. Every column-count cells starts another row. A nested table may be opened within a cell.
PushColorvoid
public void PushColor(Color color);Opens a text-glyph color span, including alpha. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
color | Color | — |
colorColor for the corresponding text, outline or line.
PushContextvoid
public void PushContext();Places a context boundary for subsequent Push spans. PopContext closes nested spans through that boundary; does not undo text already added.
PushCustomfxvoid
public void PushCustomfx(RichTextEffect effect, Reckfell.Collections.Dictionary env);Opens an effect span: call PushCustomfx, add text with AddText, then close it with Pop. Uses the resource directly without registering a BBCode tag. env is shared by reference; create a separate dictionary for independent parameters. Does not create text or apply the effect to already completed spans.
| Name | Type | Default |
|---|---|---|
effect | RichTextEffect | — |
env | Reckfell.Collections.Dictionary | — |
effectValid RichTextEffect resource.
envSeparate span-parameter dictionary retained by shared reference.
PushDropcapvoid
public void PushDropcap(string @string, Font font, int size, Rect2? dropcapMargins = default, Color? color = default, int outlineSize = 0, Color? outlineColor = default);Adds a decorative drop cap as standalone content: requires nonempty text, a valid Font and a positive size. Unlike ordinary Push spans, requires no corresponding Pop. Does not alter an existing first letter or append source Text.
| Name | Type | Default |
|---|---|---|
string | string | — |
font | Font | — |
size | int | — |
dropcapMargins | Rect2? | default |
color | Color? | default |
outlineSize | int | 0 |
outlineColor | Color? | default |
stringNonempty drop-cap text.
fontValid shared Font resource.
sizePositive drop-cap pixel font size.
dropcapMarginsDrop-cap margins as Rect2.
colorColor for the corresponding text, outline or line.
outlineSizeNonnegative outline width in pixels.
outlineColorDrop-cap outline color.
PushFgcolorvoid
public void PushFgcolor(Color fgcolor);Opens a foreground rectangular-color span over text. Use PushColor for ordinary letter color; an opaque foreground fill can cover letters. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
fgcolor | Color | — |
fgcolorFill color over text.
PushFontvoid
public void PushFont(Font font, int fontSize = 0);Opens a span using a Font resource and optional size. The resource is shared; do not free a borrowed label resource. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
font | Font | — |
fontSize | int | 0 |
fontValid shared Font resource.
fontSizePixel font size; zero in PushFont retains size according to the current rules.
PushFontSizevoid
public void PushFontSize(int fontSize);Opens a positive pixel font-size span while retaining the selected font. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
fontSize | int | — |
fontSizePixel font size; zero in PushFont retains size according to the current rules.
PushHintvoid
public void PushHint(string description);Opens a tooltip span for following content. Add text, then call Pop. Does not add a character or navigation handler.
| Name | Type | Default |
|---|---|---|
description | string | — |
descriptionTooltip text for the following span.
PushIndentvoid
public void PushIndent(int level);Opens an indentation span with a nonnegative level. Does not insert spaces into source Text. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
level | int | — |
levelNonnegative indentation/list level.
PushItalicsvoid
public void PushItalics();Opens a theme italic-font span; combines with active bold. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
PushLanguagevoid
public void PushLanguage(string language);Opens a text-shaping language-hint span. Does not translate its contents. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
language | string | — |
languageShaping language hint rather than a translation target.
PushList2 overloads
public void PushList(int level, RichTextLabel.ListType type, bool capitalize);Opens a list with a specified type and level. Add item text separated by Newline; bullets/numbering are presentation rather than source-BBCode characters. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
level | int | — |
type | RichTextLabel.ListType | — |
capitalize | bool | — |
levelNonnegative indentation/list level.
typeListType bullet or numbering style.
capitalizeUse uppercase letters/Roman numerals.
public void PushList(int level, RichTextLabel.ListType type, bool capitalize, string bullet = "\u2022");Opens a list with a specified type and level. Add item text separated by Newline; bullets/numbering are presentation rather than source-BBCode characters. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
level | int | — |
type | RichTextLabel.ListType | — |
capitalize | bool | — |
bullet | string | "\u2022" |
levelNonnegative indentation/list level.
typeListType bullet or numbering style.
capitalizeUse uppercase letters/Roman numerals.
bulletBullet-list marker string.
PushMeta3 overloads
public void PushMeta(Variant data);Opens a metadata span for following text; close it with Pop. data is passed to MetaClicked/MetaHoverStarted/MetaHoverEnded. It may be an ID or URL, but RichTextLabel does not open it automatically. underlineMode controls link appearance; tooltip supplies a hint.
| Name | Type | Default |
|---|---|---|
data | Variant | — |
dataSpan metadata as a Variant, such as an ID or URL.
public void PushMeta(Variant data, RichTextLabel.MetaUnderline underlineMode);Opens a metadata span for following text; close it with Pop. data is passed to MetaClicked/MetaHoverStarted/MetaHoverEnded. It may be an ID or URL, but RichTextLabel does not open it automatically. underlineMode controls link appearance; tooltip supplies a hint.
| Name | Type | Default |
|---|---|---|
data | Variant | — |
underlineMode | RichTextLabel.MetaUnderline | — |
dataSpan metadata as a Variant, such as an ID or URL.
underlineModeMetadata-span underline policy.
public void PushMeta(Variant data, RichTextLabel.MetaUnderline underlineMode = RichTextLabel.MetaUnderline.Always, string tooltip = "");Opens a metadata span for following text; close it with Pop. data is passed to MetaClicked/MetaHoverStarted/MetaHoverEnded. It may be an ID or URL, but RichTextLabel does not open it automatically. underlineMode controls link appearance; tooltip supplies a hint.
| Name | Type | Default |
|---|---|---|
data | Variant | — |
underlineMode | RichTextLabel.MetaUnderline | RichTextLabel.MetaUnderline.Always |
tooltip | string | "" |
dataSpan metadata as a Variant, such as an ID or URL.
underlineModeMetadata-span underline policy.
tooltipSpan tooltip text; an empty string supplies no explicit tooltip.
PushMonovoid
public void PushMono();Opens a theme monospace-font span. Does not enable code highlighting or language analysis. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
PushNormalvoid
public void PushNormal();Opens a theme normal-font span. Does not reset every other color, indent or nested span. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
PushOutlineColorvoid
public void PushOutlineColor(Color color);Opens a glyph-outline color span. Does not itself set a nonzero outline width. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
color | Color | — |
colorColor for the corresponding text, outline or line.
PushOutlineSizevoid
public void PushOutlineSize(int outlineSize);Opens a pixel outline-width span; zero disables the outline in this span. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
outlineSize | int | — |
outlineSizeNonnegative outline width in pixels.
PushParagraph3 overloads
public void PushParagraph(HorizontalAlignment alignment, Control.TextDirection baseDirection, string language, TextServer.StructuredTextParser stParser);Opens paragraph settings: alignment, direction, language, BiDi parser, justification and tab positions. These configure content rather than a Control container. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
alignment | HorizontalAlignment | — |
baseDirection | Control.TextDirection | — |
language | string | — |
stParser | TextServer.StructuredTextParser | — |
alignmentParagraph content horizontal alignment.
baseDirectionBase BiDi text direction.
languageShaping language hint rather than a translation target.
stParserStructured bidirectional-text parser mode.
public void PushParagraph(HorizontalAlignment alignment, Control.TextDirection baseDirection, string language, TextServer.StructuredTextParser stParser, TextServer.JustificationFlag justificationFlags, ReadOnlySpan<float> tabStops);Opens paragraph settings: alignment, direction, language, BiDi parser, justification and tab positions. These configure content rather than a Control container. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
alignment | HorizontalAlignment | — |
baseDirection | Control.TextDirection | — |
language | string | — |
stParser | TextServer.StructuredTextParser | — |
justificationFlags | TextServer.JustificationFlag | — |
tabStops | ReadOnlySpan<float> | — |
alignmentParagraph content horizontal alignment.
baseDirectionBase BiDi text direction.
languageShaping language hint rather than a translation target.
stParserStructured bidirectional-text parser mode.
justificationFlagsText-justification rule bits.
tabStopsPixel tab-stop positions.
public void PushParagraph(HorizontalAlignment alignment, Control.TextDirection baseDirection = Control.TextDirection.Auto, string language = "", TextServer.StructuredTextParser stParser = TextServer.StructuredTextParser.Default, TextServer.JustificationFlag justificationFlags = TextServer.JustificationFlag.Kashida | TextServer.JustificationFlag.WordBound | TextServer.JustificationFlag.SkipLastLine | TextServer.JustificationFlag.DoNotSkipSingleLine, float[] tabStops = null);Opens paragraph settings: alignment, direction, language, BiDi parser, justification and tab positions. These configure content rather than a Control container. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
alignment | HorizontalAlignment | — |
baseDirection | Control.TextDirection | Control.TextDirection.Auto |
language | string | "" |
stParser | TextServer.StructuredTextParser | TextServer.StructuredTextParser.Default |
justificationFlags | TextServer.JustificationFlag | TextServer.JustificationFlag.Kashida | TextServer.JustificationFlag.WordBound | TextServer.JustificationFlag.SkipLastLine | TextServer.JustificationFlag.DoNotSkipSingleLine |
tabStops | float[] | null |
alignmentParagraph content horizontal alignment.
baseDirectionBase BiDi text direction.
languageShaping language hint rather than a translation target.
stParserStructured bidirectional-text parser mode.
justificationFlagsText-justification rule bits.
tabStopsPixel tab-stop positions.
PushStrikethrough2 overloads
public void PushStrikethrough();Opens text strikethrough. Does not remove characters from GetParsedText or selection. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
public void PushStrikethrough(Color? color = default);Opens text strikethrough. Does not remove characters from GetParsedText or selection. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
color | Color? | default |
colorColor for the corresponding text, outline or line.
PushTable2 overloads
public void PushTable(int columns, InlineAlignment inlineAlign, int alignToRow);Opens a table with a positive column count. Configure columns, then for each cell call PushCell, add content and Pop the cell; another Pop after all cells closes the table. Cells fill in row order; there is no separate PushRow. alignToRow selects an alignment row, with -1 using the last. name supplies an accessibility description rather than a visible heading.
| Name | Type | Default |
|---|---|---|
columns | int | — |
inlineAlign | InlineAlignment | — |
alignToRow | int | — |
columnsPositive table column count.
inlineAlignInline object alignment relative to the text row.
alignToRowZero-based alignment-row index; -1 selects the last.
public void PushTable(int columns, InlineAlignment inlineAlign = InlineAlignment.TopTo, int alignToRow = -1, string name = "");Opens a table with a positive column count. Configure columns, then for each cell call PushCell, add content and Pop the cell; another Pop after all cells closes the table. Cells fill in row order; there is no separate PushRow. alignToRow selects an alignment row, with -1 using the last. name supplies an accessibility description rather than a visible heading.
| Name | Type | Default |
|---|---|---|
columns | int | — |
inlineAlign | InlineAlignment | InlineAlignment.TopTo |
alignToRow | int | -1 |
name | string | "" |
columnsPositive table column count.
inlineAlignInline object alignment relative to the text row.
alignToRowZero-based alignment-row index; -1 selects the last.
nameAccessibility name for a table/column rather than an inserted heading.
PushUnderline2 overloads
public void PushUnderline();Opens text underlining. A color with alpha zero uses the current text color and theme alpha rather than drawing an invisible line. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
public void PushUnderline(Color? color = default);Opens text underlining. A color with alpha zero uses the current text color and theme alpha rather than drawing an invisible line. Add content and close the span with Pop. Does not rewrite earlier items or source Text.
| Name | Type | Default |
|---|---|---|
color | Color? | default |
colorColor for the corresponding text, outline or line.
ReloadEffectsvoid
public void ReloadEffects();Reparses stored Text only when BBCode is enabled and the stack has not been externally modified. Not a universal reload for manually constructed spans: rebuild the required content explicitly.
RemoveParagraph2 overloads
public bool RemoveParagraph(int paragraph);Removes a main-flow paragraph and its owned content, clearing selection. Later paragraph indices shift; removing the only one leaves empty content with one paragraph. Does not rewrite source Text and has no built-in Undo. noInvalidate false invalidates affected caches; true retains them for an optimized path requiring separate cache-freshness management. Returns false for an invalid index.
| Name | Type | Default |
|---|---|---|
paragraph | int | — |
paragraphMain-flow paragraph index from zero through GetParagraphCount() - 1.
boolRemoves a main-flow paragraph and its owned content, clearing selection. Later paragraph indices shift; removing the only one leaves empty content with one paragraph. Does not rewrite source Text and has no built-in Undo. noInvalidate false invalidates affected caches; true retains them for an optimized path requiring separate cache-freshness management. Returns false for an invalid index.
public bool RemoveParagraph(int paragraph, bool noInvalidate = false);Removes a main-flow paragraph and its owned content, clearing selection. Later paragraph indices shift; removing the only one leaves empty content with one paragraph. Does not rewrite source Text and has no built-in Undo. noInvalidate false invalidates affected caches; true retains them for an optimized path requiring separate cache-freshness management. Returns false for an invalid index.
| Name | Type | Default |
|---|---|---|
paragraph | int | — |
noInvalidate | bool | false |
paragraphMain-flow paragraph index from zero through GetParagraphCount() - 1.
noInvalidateRetain caches for the optimized path; normally use false.
boolRemoves a main-flow paragraph and its owned content, clearing selection. Later paragraph indices shift; removing the only one leaves empty content with one paragraph. Does not rewrite source Text and has no built-in Undo. noInvalidate false invalidates affected caches; true retains them for an optimized path requiring separate cache-freshness management. Returns false for an invalid index.
ScrollToLinevoid
public void ScrollToLine(int line);Scrolls to a wrapped display row rather than a logical source-BBCode line. Values <= zero go to the start; an oversized index goes to the end of available layout. Wait for readiness first when an exact position is needed.
| Name | Type | Default |
|---|---|---|
line | int | — |
lineZero-based wrapped display-row index.
ScrollToParagraphvoid
public void ScrollToParagraph(int paragraph);Scrolls to a main-flow paragraph. Values <= zero go to the start; values beyond calculated paragraphs go to the scrollbar end. Does not select or edit text.
| Name | Type | Default |
|---|---|---|
paragraph | int | — |
paragraphZero-based main-flow paragraph index.
ScrollToSelectionvoid
public void ScrollToSelection();Scrolls to the current selection start using GetSelectionLineOffset. Does nothing without a selection. Does not create selection or edit content.
SelectAllvoid
public void SelectAll();Selects constructed content when SelectionEnabled. Does not copy to the clipboard. With background layout, wait for IsFinished so selection bounds cover ready content.
SetAutowrapModevoid
public void SetAutowrapMode(TextServer.AutowrapMode autowrapMode);Wrapping rule for available width: off, arbitrary or word-based. Changes display rows and metrics while retaining source Text. Give the label a layout width for predictable results.
| Name | Type | Default |
|---|---|---|
autowrapMode | TextServer.AutowrapMode | — |
autowrapModeWrapping mode for available width.
SetAutowrapTrimFlagsvoid
public void SetAutowrapTrimFlags(TextServer.LineBreakFlag autowrapTrimFlags);Flags for edge-whitespace/indent handling during wrapping. The setter retains only TextServer trim-mask bits; other LineBreakFlag values do not select a separate wrapping mode here. Source text is not trimmed.
| Name | Type | Default |
|---|---|---|
autowrapTrimFlags | TextServer.LineBreakFlag | — |
autowrapTrimFlagsEdge-whitespace/indent bits; only the trim mask is retained.
SetCellBorderColorvoid
public void SetCellBorderColor(Color color);Sets only the current cell’s border color. Color(0,0,0,0) restores the theme color, so does not guarantee hiding a nonzero theme border. Configure directly in the cell before opening nested Push spans.
| Name | Type | Default |
|---|---|---|
color | Color | — |
colorImage modulation or the corresponding decoration color.
SetCellPaddingvoid
public void SetCellPadding(Rect2 padding);Sets current-cell padding: Rect2.Position.X/Y are left/top, Rect2.Size.X/Y are right/bottom. Packs four edge values rather than an ordinary width/height rectangle. Use nonnegative values and configure immediately after PushCell.
| Name | Type | Default |
|---|---|---|
padding | Rect2 | — |
paddingRect2(left, top, right, bottom) padding values in pixels.
SetCellRowBackgroundColorvoid
public void SetCellRowBackgroundColor(Color oddRowBg, Color evenRowBg);Sets two background colors for the current cell; drawing chooses one according to table-row parity. Does not automatically recolor other cells in the row. Color(0,0,0,0) restores the corresponding theme background.
| Name | Type | Default |
|---|---|---|
oddRowBg | Color | — |
evenRowBg | Color | — |
oddRowBgThis cell’s odd-row background; zero Color restores the theme.
evenRowBgThis cell’s even-row background; zero Color restores the theme.
SetCellSizeOverridevoid
public void SetCellSizeOverride(Vector2 minSize, Vector2 maxSize);Stores current-cell size constraints. Current layout consumes positive Y values as minimum/maximum height; X does not set column width. A nonpositive Y leaves that bound unset. In a multi-paragraph cell, Y bounds calculated individual paragraph heights rather than their sum. Configure columns for width and keep bounds consistent. Call immediately after PushCell.
| Name | Type | Default |
|---|---|---|
minSize | Vector2 | — |
maxSize | Vector2 | — |
minSizeIn current layout, positive Y bounds height below; X does not set width.
maxSizeIn current layout, positive Y bounds height above; <= zero leaves it unset.
SetContextMenuEnabledvoid
public void SetContextMenuEnabled(bool enabled);Allows opening the built-in user menu. false neither deletes the PopupMenu nor prohibits programmatic GetMenu/MenuOption. An interface setting rather than a restriction on application data copying.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described interaction setting.
SetDeselectOnFocusLossEnabledvoid
public void SetDeselectOnFocusLossEnabled(bool enable);Allows deselection on focus loss. Switching false to true while unfocused immediately clears an existing selection. Use false to retain it when moving to another control.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described interaction setting.
SetDragAndDropSelectionEnabledvoid
public void SetDragAndDropSelectionEnabled(bool enable);Allows dragging selected plain text out of the label. Requires SelectionEnabled; does not enable editing or arbitrary file drops. Assignment does not initiate a drag.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described interaction setting.
SetEffectsvoid
public void SetEffects(Reckfell.Collections.Array effects);Custom BBCode effect resources. The setter replaces the array and calls ReloadEffects; the getter shares the array, so mutating it does not itself reparse text. Duplicate names are ambiguous: the first matching name is used. Use PushCustomfx for direct programmatic application.
| Name | Type | Default |
|---|---|---|
effects | Reckfell.Collections.Array | — |
effectsRichTextEffect resources for registered tags.
SetFitContentvoid
public void SetFitContent(bool enabled);Includes content in the label’s minimum size. A parent container may expand it; does not set an exact Size or shrink the font. Account for wrapping and parent constraints.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described layout setting.
SetHintUnderlinevoid
public void SetHintUnderline(bool enable);Allows visual underlining of PushHint spans. Does not enable/disable tooltip content or edit text.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described interaction setting.
SetHorizontalAlignmentvoid
public void SetHorizontalAlignment(HorizontalAlignment alignment);Default horizontal text alignment; local paragraph formatting may override it. Fill uses JustificationFlags for justification. Does not move the Control in its parent container.
| Name | Type | Default |
|---|---|---|
alignment | HorizontalAlignment | — |
alignmentText alignment inside the label.
SetJustificationFlagsvoid
public void SetJustificationFlags(TextServer.JustificationFlag justificationFlags);Line-stretching rules for justified text, such as word and final-line handling. Work with the corresponding alignment rather than setting label width.
| Name | Type | Default |
|---|---|---|
justificationFlags | TextServer.JustificationFlag | — |
justificationFlagsText-justification rule bits.
SetLanguagevoid
public void SetLanguage(string language);Language hint for text shaping and wrapping. Does not translate the string; UI translation of source Text is a separate mechanism.
| Name | Type | Default |
|---|---|---|
language | string | — |
languageLanguage hint code for text shaping.
SetMaximumFontSizevoid
public void SetMaximumFontSize(int size);Upper font-fitting bound with ResizeFontToFit. Keep consistent with MinimumFontSize; constrains fitting rather than universally prohibiting local BBCode font sizes.
| Name | Type | Default |
|---|---|---|
size | int | — |
sizePositive font-fitting bound consistent with the other bound.
SetMetaUnderlinevoid
public void SetMetaUnderline(bool enable);Allows underlining metadata spans according to their MetaUnderline policy. Does not create links or open URLs. An explicit PushUnderline span is separate formatting.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable the described interaction setting.
SetMinimumFontSizevoid
public void SetMinimumFontSize(int size);Lower font-fitting bound with ResizeFontToFit. Supply a positive value no greater than MaximumFontSize. Assignment does not mean this exact size is already drawn.
| Name | Type | Default |
|---|---|---|
size | int | — |
sizePositive font-fitting bound consistent with the other bound.
SetProgressBarDelayvoid
public void SetProgressBarDelay(int delayMs);Delay before displaying background-loading progress, in milliseconds. A positive value waits that interval; zero and negative values disable the indicator. Does not set parsing speed or character-reveal timing.
| Name | Type | Default |
|---|---|---|
delayMs | int | — |
delayMsPositive delay in milliseconds; <= zero disables the indicator.
SetResizeFontToFitvoid
public void SetResizeFontToFit(bool enabled);Allows choosing a base font size for the available area within MinimumFontSize–MaximumFontSize. Unlike FitContent, adjusts the font rather than the minimum-size requirement. Fitting depends on width and height; a tiny minimum does not ensure legibility.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described layout setting.
SetScrollActivevoid
public void SetScrollActive(bool active);Allows built-in vertical scrolling. Toggling reapplies source Text: when mixed with manual AddText/Push, content may rebuild from the stored string. Set the mode before manual construction. Does not mean all content fits without a scrollbar.
| Name | Type | Default |
|---|---|---|
active | bool | — |
activeAllow built-in vertical scrolling.
SetScrollFollowvoid
public void SetScrollFollow(bool follow);Allows following the end of appended text. If the user scrolls upward, actual following can pause until returning to the bottom. The getter reports the setting rather than whether the view is currently at the bottom.
| Name | Type | Default |
|---|---|---|
follow | bool | — |
followEnable the corresponding scroll-follow mode.
SetScrollFollowVisibleCharactersvoid
public void SetScrollFollowVisibleCharacters(bool follow);Scrolls to content revealed through VisibleCharacters. Differs from following the full text end; intended for progressive reveal. Setting true may immediately change scrolling.
| Name | Type | Default |
|---|---|---|
follow | bool | — |
followEnable the corresponding scroll-follow mode.
SetSelectionEnabledvoid
public void SetSelectionEnabled(bool enabled);Allows selecting displayed text and using SelectAll. Enabling sets FocusMode.All; disabling clears active selection and switches to accessibility focus mode. Does not make the label editable or change Text.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described interaction setting.
SetShortcutKeysEnabledvoid
public void SetShortcutKeysEnabled(bool enabled);Allows the label’s built-in command shortcuts. Does not automatically enable SelectionEnabled or prohibit direct SelectAll/MenuOption calls.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledEnable the described interaction setting.
SetStructuredTextBidiOverridevoid
public void SetStructuredTextBidiOverride(TextServer.StructuredTextParser parser);Selects parsing of structured bidirectional text, such as addresses or paths. A shaping setting rather than a regex replacement of source text. StructuredTextBidiOverrideOptions supplies parameters.
| Name | Type | Default |
|---|---|---|
parser | TextServer.StructuredTextParser | — |
parserStructured BiDi-text parser mode.
SetStructuredTextBidiOverrideOptionsvoid
public void SetStructuredTextBidiOverrideOptions(Reckfell.Collections.Array args);Structured BiDi-parser parameters. The array is shared; in-place mutation does not automatically trigger recalculation. Assign a new array with different content to update: the setter may skip equal content.
| Name | Type | Default |
|---|---|---|
args | Reckfell.Collections.Array | — |
argsParser parameters; retained by shared reference.
SetTabSizevoid
public void SetTabSize(int spaces);Default tab width measured in spaces; use a positive value. Changes tab presentation without replacing tabs with spaces in Text. Use TabStops for explicit positions.
| Name | Type | Default |
|---|---|---|
spaces | int | — |
spacesPositive tab width in spaces.
SetTabStops2 overloads
public void SetTabStops(ReadOnlySpan<float> tabStops);Explicit tab positions in text-area pixels; supply increasing positive values. C# float[] transfers data and the getter returns values: mutating the result does not reconfigure the label. Does not set source-line indentation.
| Name | Type | Default |
|---|---|---|
tabStops | ReadOnlySpan<float> | — |
tabStopsIncreasing positive tab positions in pixels.
public void SetTabStops(float[] tabStops);Explicit tab positions in text-area pixels; supply increasing positive values. C# float[] transfers data and the getter returns values: mutating the result does not reconfigure the label. Does not set source-line indentation.
| Name | Type | Default |
|---|---|---|
tabStops | float[] | — |
tabStopsIncreasing positive tab positions in pixels.
SetTableColumnExpand2 overloads
public void SetTableColumnExpand(int column, bool expand, int ratio);Configures the current open table; call before PushCell or after popping a cell. column is zero-based; ratio is a positive relative weight rather than pixels or percentages. expand allows space distribution; shrink true caps stretching at the content’s natural maximum, false permits more free width. Does not guarantee fixed fractions of the whole table: minima/maxima matter. The short overload uses shrink true.
| Name | Type | Default |
|---|---|---|
column | int | — |
expand | bool | — |
ratio | int | — |
columnZero-based existing column index.
expandParticipate in table-width distribution.
ratioPositive relative stretch weight.
public void SetTableColumnExpand(int column, bool expand, int ratio = 1, bool shrink = true);Configures the current open table; call before PushCell or after popping a cell. column is zero-based; ratio is a positive relative weight rather than pixels or percentages. expand allows space distribution; shrink true caps stretching at the content’s natural maximum, false permits more free width. Does not guarantee fixed fractions of the whole table: minima/maxima matter. The short overload uses shrink true.
| Name | Type | Default |
|---|---|---|
column | int | — |
expand | bool | — |
ratio | int | 1 |
shrink | bool | true |
columnZero-based existing column index.
expandParticipate in table-width distribution.
ratioPositive relative stretch weight.
shrinkCap stretching at the content’s natural maximum.
SetTableColumnNamevoid
public void SetTableColumnName(int column, string name);Sets the current table’s accessibility column name. Does not insert a visible heading row: create its cells separately. Requires the table span rather than a cell/font span.
| Name | Type | Default |
|---|---|---|
column | int | — |
name | string | — |
columnZero-based existing column index.
nameAccessibility name for a table/column rather than an inserted heading.
SetTextvoid
public void SetText(string text);Source string for rebuilding the label, including UI translation and BBCode parsing when BbcodeEnabled. Assignment replaces manual content; assigning the same nonempty string may not rebuild it. AddText, AppendText and Push methods do not append their result to this property. Use GetParsedText for resulting plain text.
| Name | Type | Default |
|---|---|---|
text | string | — |
textSource or literal text as defined by the method; AddText does not parse tags.
SetTextDirectionvoid
public void SetTextDirection(Control.TextDirection direction);Text direction for BiDi shaping. Does not manually reverse source characters or translate text. Configure structured-text parsing separately.
| Name | Type | Default |
|---|---|---|
direction | Control.TextDirection | — |
directionText-shaping direction rather than a string-edit command.
SetThreadedvoid
public void SetThreaded(bool threaded);Allows background text layout; defaults to false. Does not make arbitrary RichTextLabel calls thread-safe or move all drawing to another thread. Check IsFinished; until completion, metrics may cover only the processed portion.
| Name | Type | Default |
|---|---|---|
threaded | bool | — |
threadedAllow background layout calculation.
SetUseBbcodevoid
public void SetUseBbcode(bool enable);Controls BBCode parsing of the Text property. Does not make manual AddText parse markup; AppendText parses markup independently. Toggling does not guarantee rebuilding a manually modified stack.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableEnable BBCode parsing of Text.
SetVerticalAlignmentvoid
public void SetVerticalAlignment(VerticalAlignment alignment);Vertical placement of text content inside the label. Does not change Control alignment in its parent or enable automatic scrolling.
| Name | Type | Default |
|---|---|---|
alignment | VerticalAlignment | — |
alignmentText alignment inside the label.
SetVisibleCharactersvoid
public void SetVisibleCharacters(int amount);Progressive-reveal limit: -1 shows all, zero hides text, a nonnegative value sets a limit. VisibleCharactersBehavior chooses behavior before/after glyph shaping. Not a frame count or Text’s UTF-16 Length. The setter updates VisibleRatio but does not explicitly clamp oversized values; keep animation values between zero and GetTotalCharacterCount.
| Name | Type | Default |
|---|---|---|
amount | int | — |
amountReveal limit; -1 shows all, zero hides text.
SetVisibleCharactersBehaviorvoid
public void SetVisibleCharactersBehavior(TextServer.VisibleCharactersBehavior behavior);Chooses whether reveal limits apply before shaping or to shaped characters/glyphs. Before shaping may change layout; after shaping retains full-line context, with reveal units depending on mode. Account for ligatures, composite characters and RTL; do not assume one C# char per visible glyph.
| Name | Type | Default |
|---|---|---|
behavior | TextServer.VisibleCharactersBehavior | — |
behaviorText-system VisibleCharactersBehavior mode.
SetVisibleRatiovoid
public void SetVisibleRatio(float ratio);Reveal fraction: values from zero to one convert to integer VisibleCharacters by truncation. One or greater shows all; a negative value hides text. Creates no timer: animate the fraction from your application. Refers to the content counter rather than necessarily the number of visually distinct letters.
| Name | Type | Default |
|---|---|---|
ratio | float | — |
ratioFraction from zero to one; one or greater shows all.
UpdateImage3 overloads
public void UpdateImage(Variant key, RichTextLabel.ImageUpdateMask mask, Texture2D image, int width, int height, Color? color, InlineAlignment inlineAlign, Rect2? region, bool pad, string tooltip, bool sizeInPercent);Updates every inline image with an equal key, including nested tables; does not create a new item. Only mask-selected fields change. With Size, a zero side retains the prior requested dimension rather than resetting to automatic sizing. WidthUnit changes both axis units. To apply region to an ordinary texture, also supply Texture and the source resource: Region without Texture changes cropping only for an existing AtlasTexture. Does not rewrite source Text.
| Name | Type | Default |
|---|---|---|
key | Variant | — |
mask | RichTextLabel.ImageUpdateMask | — |
image | Texture2D | — |
width | int | — |
height | int | — |
color | Color? | — |
inlineAlign | InlineAlignment | — |
region | Rect2? | — |
pad | bool | — |
tooltip | string | — |
sizeInPercent | bool | — |
keyUnique Variant update key. Equal keys update all matches; nil may match objects without explicit keys.
maskImageUpdateMask bits selecting changed fields. WidthUnit changes both-axis units; Size replaces requested numeric dimensions.
imageValid nonzero-sized Texture2D; required in UpdateImage when Texture is selected.
widthNonnegative width in selected units; zero means automatic in AddImage and retain previous in UpdateImage.
heightNonnegative height; Percent for images uses available text width.
colorImage modulation or the corresponding decoration color.
inlineAlignInline object alignment relative to the text row.
regionTexture region in pixels; an empty Rect2 uses the whole texture.
padCenter the image in the allocated area without upscaling beyond natural size rather than stretching.
tooltipImage tooltip text.
sizeInPercentIn the older overload, true selects percent units on both axes.
public void UpdateImage(Variant key, RichTextLabel.ImageUpdateMask mask, Texture2D image, int width, int height, Color? color, InlineAlignment inlineAlign, Rect2? region, bool pad, string tooltip, bool widthInPercent, bool heightInPercent);Updates every inline image with an equal key, including nested tables; does not create a new item. Only mask-selected fields change. With Size, a zero side retains the prior requested dimension rather than resetting to automatic sizing. WidthUnit changes both axis units. To apply region to an ordinary texture, also supply Texture and the source resource: Region without Texture changes cropping only for an existing AtlasTexture. Does not rewrite source Text.
| Name | Type | Default |
|---|---|---|
key | Variant | — |
mask | RichTextLabel.ImageUpdateMask | — |
image | Texture2D | — |
width | int | — |
height | int | — |
color | Color? | — |
inlineAlign | InlineAlignment | — |
region | Rect2? | — |
pad | bool | — |
tooltip | string | — |
widthInPercent | bool | — |
heightInPercent | bool | — |
keyUnique Variant update key. Equal keys update all matches; nil may match objects without explicit keys.
maskImageUpdateMask bits selecting changed fields. WidthUnit changes both-axis units; Size replaces requested numeric dimensions.
imageValid nonzero-sized Texture2D; required in UpdateImage when Texture is selected.
widthNonnegative width in selected units; zero means automatic in AddImage and retain previous in UpdateImage.
heightNonnegative height; Percent for images uses available text width.
colorImage modulation or the corresponding decoration color.
inlineAlignInline object alignment relative to the text row.
regionTexture region in pixels; an empty Rect2 uses the whole texture.
padCenter the image in the allocated area without upscaling beyond natural size rather than stretching.
tooltipImage tooltip text.
widthInPercentUse percent rather than pixel width.
heightInPercentUse percent rather than pixel height; the percentage base is text width.
public void UpdateImage(Variant key, RichTextLabel.ImageUpdateMask mask, Texture2D image, float width = 0f, float height = 0f, Color? color = default, InlineAlignment inlineAlign = InlineAlignment.Center, Rect2? region = default, bool pad = false, string tooltip = "", RichTextLabel.ImageUnit widthUnit = RichTextLabel.ImageUnit.Pixel, RichTextLabel.ImageUnit heightUnit = RichTextLabel.ImageUnit.Pixel);Updates every inline image with an equal key, including nested tables; does not create a new item. Only mask-selected fields change. With Size, a zero side retains the prior requested dimension rather than resetting to automatic sizing. WidthUnit changes both axis units. To apply region to an ordinary texture, also supply Texture and the source resource: Region without Texture changes cropping only for an existing AtlasTexture. Does not rewrite source Text.
| Name | Type | Default |
|---|---|---|
key | Variant | — |
mask | RichTextLabel.ImageUpdateMask | — |
image | Texture2D | — |
width | float | 0f |
height | float | 0f |
color | Color? | default |
inlineAlign | InlineAlignment | InlineAlignment.Center |
region | Rect2? | default |
pad | bool | false |
tooltip | string | "" |
widthUnit | RichTextLabel.ImageUnit | RichTextLabel.ImageUnit.Pixel |
heightUnit | RichTextLabel.ImageUnit | RichTextLabel.ImageUnit.Pixel |
keyUnique Variant update key. Equal keys update all matches; nil may match objects without explicit keys.
maskImageUpdateMask bits selecting changed fields. WidthUnit changes both-axis units; Size replaces requested numeric dimensions.
imageValid nonzero-sized Texture2D; required in UpdateImage when Texture is selected.
widthNonnegative width in selected units; zero means automatic in AddImage and retain previous in UpdateImage.
heightNonnegative height; Percent for images uses available text width.
colorImage modulation or the corresponding decoration color.
inlineAlignInline object alignment relative to the text row.
regionTexture region in pixels; an empty Rect2 uses the whole texture.
padCenter the image in the allocated area without upscaling beyond natural size rather than stretching.
tooltipImage tooltip text.
widthUnitPixel, Percent or Em for width; UpdateImage applies it through the WidthUnit mask.
heightUnitHeight units; Percent uses area width and Em multiplies font size.
Signals and events4
FinishedEvent
public event Action Finished;Signals completion of a text-layout calculation. Does not mean a frame has been drawn, an animation ended or future edits need no new calculation. With Threaded, emitted from the worker path; defer changes to other UI controls onto the main thread.
MetaClickedEvent
public event RichTextLabel.MetaClickedEventHandler MetaClicked;Supplies metadata for an activated link span. The application decides whether to open a URL, show help or perform an action. Metadata is a Variant, not necessarily a string; check the expected type first.
| Name | Type | Default |
|---|---|---|
meta | Variant | — |
metaThe span metadata; check its expected Variant type.
MetaHoverEndedEvent
public event RichTextLabel.MetaHoverEndedEventHandler MetaHoverEnded;Supplies metadata for the span whose hover ended. Use it to clear application hint/highlight state.
| Name | Type | Default |
|---|---|---|
meta | Variant | — |
metaThe span metadata; check its expected Variant type.
MetaHoverStartedEvent
public event RichTextLabel.MetaHoverStartedEventHandler MetaHoverStarted;Supplies span metadata when hover begins. Does not mean link navigation or a text-selection change.
| Name | Type | Default |
|---|---|---|
meta | Variant | — |
metaThe span metadata; check its expected Variant type.
RichTextLabel.ImageUnit
| Value | Description |
|---|---|
Em = 2 | Images drawn with this unit will be in percentages of the surrounding font size. |
Percent = 1 | Images drawn with this unit will be in percentages of the control width. |
Pixel = 0 | Images drawn with this unit will be in pixels. |
RichTextLabel.ImageUpdateMask
| Value | Description |
|---|---|
Alignment = 8 | If this bit is set, |
Color = 4 | If this bit is set, |
Pad = 32 | If this bit is set, |
Region = 16 | If this bit is set, |
Size = 2 | If this bit is set, |
Texture = 1 | If this bit is set, |
Tooltip = 64 | If this bit is set, |
WidthUnit = 128 | If this bit is set, |
RichTextLabel.ListType
| Value | Description |
|---|---|
Dots = 3 | Each list item has a filled circle marker. |
Letters = 1 | Each list item has a letter marker. |
Numbers = 0 | Each list item has a number marker. |
Roman = 2 | Each list item has a roman number marker. |
RichTextLabel.MenuItems
| Value | Description |
|---|---|
Copy = 0 | Copies the selected text. |
Max = 2 | Represents the size of the |
SelectAll = 1 | Selects the whole |
RichTextLabel.MetaUnderline
| Value | Description |
|---|---|
Always = 1 | If |
Never = 0 | Meta tag does not display an underline, even if |
OnHover = 2 | If |
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 type | Description |
|---|---|
default_colorColor | The default text color. Default:Color(1, 1, 1, 1) |
font_outline_colorColor | The default tint of text outline. Default:Color(0, 0, 0, 1) |
font_selected_colorColor | The color of selected text, used when Color(0, 0, 0, 0) |
font_shadow_colorColor | The color of the font's shadow. Default:Color(0, 0, 0, 0) |
selection_colorColor | The color of the selection box. Default:Color(0.1, 0.1, 1, 0.8) |
table_borderColor | The default cell border color. Default:Color(0, 0, 0, 0) |
table_even_row_bgColor | The default background color for even rows. Default:Color(0, 0, 0, 0) |
table_odd_row_bgColor | The default background color for odd rows. Default:Color(0, 0, 0, 0) |
line_separationint | Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative. Default:0 |
outline_sizeint | The size of the text outline.
Note: If using a font with 0 |
paragraph_separationint | Additional vertical spacing between paragraphs (in pixels). Spacing is added after the last line. This value can be negative. Default:0 |
shadow_offset_xint | The horizontal offset of the font's shadow. Default:1 |
shadow_offset_yint | The vertical offset of the font's shadow. Default:1 |
shadow_outline_sizeint | The size of the shadow outline. Default:1 |
strikethrough_alphaint | The default strikethrough color transparency (percent). For strikethroughs with a custom color, this theme item is only used if the custom color's alpha is 50 |
table_h_separationint | The horizontal separation of elements in a table. Default:3 |
table_v_separationint | The vertical separation of elements in a table. Default:3 |
text_highlight_h_paddingint | The horizontal padding around boxes drawn by the 3 |
text_highlight_v_paddingint | The vertical padding around boxes drawn by the 3 |
underline_alphaint | The default underline color transparency (percent). For underlines with a custom color, this theme item is only used if the custom color's alpha is 50 |
bold_fontFont | The font used for bold text. |
bold_italics_fontFont | The font used for bold italics text. |
italics_fontFont | The font used for italics text. |
mono_fontFont | The font used for monospace text. |
normal_fontFont | The default text font. |
bold_font_sizeint | The font size used for bold text. |
bold_italics_font_sizeint | The font size used for bold italics text. |
italics_font_sizeint | The font size used for italics text. |
mono_font_sizeint | The font size used for monospace text. |
normal_font_sizeint | The default text font size. |
horizontal_ruleTexture2D | The horizontal rule texture. |
focusStyleBox | The background used when the |
normalStyleBox | The normal background for the |