Repository navigation
Modern Tui TuiBlock
Paul Squires edited this page Oct 19, 2026
·
6 revisions
Home › Terminal TUI Library › Core Widgets › TuiBlock
Draws a border with titles and an optional fill; Inner gives the space inside.
type TuiBlock extends TuiWidget
as uint8 borderKind, sides
as TuiStyle borderStyle, fillStyle
as boolean fill
as TuiTitleArray titles
end typeA border with titles, and the Inner( ) rect inside it. Almost every panel starts with one. borderKind carries the underscore-free awkwardness of this module's naming: plain kind collides with the abstract Kind( ) method.
#import "std/tui"
using tui
dim as TuiScreen scr
scr.Resize( 30, 8 )
dim as TuiFrame ptr f = scr.BeginFrame( )
dim as TuiTheme th = TuiThemeDefault( )
dim as TuiBlock b
b.borderKind = TUIBORDER_ROUNDED '' NONE PLAIN ROUNDED DOUBLE THICK ASCII
b.sides = TUISIDE_ALL '' or TUISIDE_TOP or TUISIDE_LEFT, bitwise
b.borderStyle = th.border
b.fill = TRUE
b.fillStyle = th.normal
b.AddTitle( " cpu ", th.accent, TUISIDE_TOP, TUIALIGN_LEFT )
b.Render( *f, f->Area( ) )
dim as TuiRect inner = b.Inner( f->Area( ) )
print inner.x, inner.y, inner.w, inner.h '' 1 1 28 6| TuiBlock.Inner | TuiBorderSet | TuiTitle | TuiParagraph | TuiListState | TuiTable |
| TuiBlock.AddTitle | TuiBorderGlyphs | TuiTitleOf | TuiList | TuiRow | TuiTableState |
Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Core Widgets
Working examples: hello.tiko · form.tiko · dashboard.tiko
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- Partial Types
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing