Skip to content

Modern Tui TuiTabs

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

Home › Terminal TUI Library › Core Widgets › TuiTabs

TuiTabs

Draws a one-row strip of tab titles with the selected one highlighted.

Syntax

type TuiTabs extends TuiWidget
    as TuiStringArray titles
    as int32 selected
    as ustring divider
    as TuiStyle normal, active
end type

Description

A one-row tab strip. It draws only the strip -- switching what is below it is your Update's job.

Example

#import "std/tui"
using tui

dim as TuiScreen scr
scr.Resize( 40, 3 )
dim as TuiFrame ptr f = scr.BeginFrame( )
dim as TuiTheme th = TuiThemeDefault( )

dim as TuiTabs tb
tb.titles.Push( "cpu" ) : tb.titles.Push( "mem" ) : tb.titles.Push( "net" )
tb.selected = 1
tb.divider = " | "
tb.normal = th.dim_ : tb.active = th.accent
tb.Render( *f, f->Area( ) )
print tb.titles.Count( )          '' 3

See also

TuiBlock TuiBlock.AddTitle TuiBorderGlyphs TuiTitleOf TuiList TuiRow
TuiBlock.Inner TuiBorderSet TuiTitle TuiParagraph TuiListState TuiTable

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


Home · Keyword Index

Clone this wiki locally