Skip to content

Modern Tui TuiSelectState

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

Home › Terminal TUI Library › Input Widgets › TuiSelectState

TuiSelectState

Holds a dropdown's chosen option, whether it is open, and the highlighted entry.

Syntax

type TuiSelectState
    as int32 selected
    as boolean open_
    as int32 highlight
end type

Description

The dropdown's state. selected is the committed choice; highlight is where the cursor is while the list is open, so cancelling leaves the choice alone. open_ has the underscore because OPEN is a statement.

Example

#import "std/tui"
using tui

dim as TuiSelectState st
print st.selected, st.open_       '' 0 false

st.selected = 2                   '' committed
st.highlight = 0                  '' just browsing
print st.selected                 '' 2

See also

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

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