Skip to content

Modern Tui TuiTextInput SelectionEnd

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Terminal TUI Library › Input Widgets › TuiTextInput.SelectionEnd

TuiTextInput.SelectionEnd

Returns where the selection ends, or the cursor position if nothing is selected.

Syntax

TuiTextInput.SelectionEnd( ) as int32

Description

The upper end of the selection in code units. Equal to SelectionStart when nothing is selected.

Example

#import "std/tui"
using tui

dim as TuiTextInputState st
TuiTextInputStateInit( st )
st.text = "abc"
st.cursor = 2

dim as TuiTextInput box
box.state = @st
print box.SelectionStart( ) = box.SelectionEnd( ) '' -1 (true)  -- no selection

See also

TuiTextInput TuiTextInput.SelectionStart TuiTextArea TuiCheckbox
TuiTextInputState TuiTextInput.DeleteSelection TuiTextAreaState TuiRadioGroup
TuiTextInputStateInit TuiTextInput.Insert TuiTextAreaStateInit TuiSelect

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Input Widgets
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally