Skip to content

Modern Tui TuiMessageBox Cancelled

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

Home › Terminal TUI Library › Overlays and Chrome › TuiMessageBox.Cancelled

TuiMessageBox.Cancelled

Returns true once the dialog was dismissed with Esc.

Syntax

TuiMessageBox.Cancelled( ) as boolean

Description

True once Esc was pressed -- dismissed rather than answered, which is a different thing from choosing the Cancel button.

Example

#import "std/numeric"
#import "std/tui"
using tui, numeric

dim as TuiMessageBox mb
mb.buttons.Push( "Yes" ) : mb.buttons.Push( "No" )

dim as TuiEvent e
e.kind = TUIEVENT_KEY : e.key.code = TUIKEY_ESCAPE
mb.HandleEvent( e )
print mb.Cancelled( ), mb.Accepted( )  '' true false

See also

TuiPopup TuiMenu TuiStatusItem TuiStatusBar.Add
TuiMessageBox TuiMenuBar TuiStatusItemOf TuiTreeNode
TuiMessageBox.Accepted TuiMenuBar.IsOpen TuiStatusBar TuiTreeState

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Overlays and Chrome
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally