Skip to content

Modern Tui TuiFrame SetCell

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

Home › Terminal TUI Library › Buffer and Frame › TuiFrame.SetCell

TuiFrame.SetCell

Writes one character cell, replacing the style that was there.

Syntax

TuiFrame.SetCell( byval x as int32, byval y as int32, byref ch as ustring, byval st as TuiStyle )

Description

Writes one cell. THE STYLE IS ASSIGNED, NOT MERGED -- to compose with what is underneath, patch first. Out-of-clip coordinates are dropped.

Example

#import "std/tui"
using tui

dim as TuiScreen scr
scr.Resize( 20, 4 )
dim as TuiFrame ptr f = scr.BeginFrame( )

f->SetCell( 1, 1, "*", TuiStyleOf( TuiWhite( ), TuiBlue( ) ) )
print scr.Back( )->At( 1, 1 )->st.bg.Index( )      '' 4

'' composing instead of replacing
dim as TuiStyle under = scr.Back( )->At( 1, 1 )->st
f->SetCell( 1, 1, "*", under.Patch( TuiStylePatch( TuiRed( ), TuiDefaultColor( ), _
                                                   0, 0 ) ) )

See also

TuiCell TuiCell.Equals TuiBuffer TuiBuffer.Clear TuiBuffer.At TuiFrame
TuiCell.SetChar TuiCellBlank TuiBuffer.Resize TuiBuffer.InBounds TuiBuffer.Count TuiFrame.Area

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


Home · Keyword Index

Clone this wiki locally