Table of Contents

Property SelectedLength

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

SelectedLength

Gets the length of the selected text in text elements.

public int SelectedLength { get; }

Property Value

int

The number of text elements (graphemes) currently selected. Returns 0 when no text is selected.

Remarks

This value represents the absolute length of the selection, regardless of selection direction. Use in combination with SelectedStart and SelectedText to work with selections.

See Also