Skip to content

Modern Tui TuiTerminal Size

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

Home › Terminal TUI Library › Terminal › TuiTerminal.Size

TuiTerminal.Size

Returns the terminal's size in columns and rows, or an error if it reports none.

Syntax

TuiTerminal.Size( ) as TuiSizeResult

Description

The current terminal size, as Result( of TuiSize, TuiError ). It is never zero: a terminal that reports nothing useful yields an error rather than a 0x0 screen you would then divide by.

Example

#import "std/tui"
using tui

dim as TuiTerminal term
dim as TuiSizeResult sr = term.Size( )
if( sr.IsOk( ) ) then
    print sr.Value( ).cols; "x"; sr.Value( ).rows
else
    print "no size: " & sr.Failure( ).Message( )
end if

See also

TuiTerminal TuiTerminal.IsActive TuiTerminal.Write TuiTerminal.Discard
TuiTerminal.Enter TuiTerminal.Caps TuiTerminal.WriteText TuiTerminal.Pending
TuiTerminal.Leave TuiTerminal.DetectCaps TuiTerminal.Flush TuiTerminal.TakeResize

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


Home · Keyword Index

Clone this wiki locally