Skip to content

Modern Tui TuiFrame BlendStyle

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

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

TuiFrame.BlendStyle

Lays a style over every cell of a rectangle, keeping the characters.

Syntax

TuiFrame.BlendStyle( byval r as TuiRect, byval over as TuiStyle )

Description

Patches the style of every cell in a rect, leaving the characters alone. This is what dims the background behind a modal popup -- the text underneath stays readable, it just loses the light.

Example

#import "std/tui"
using tui

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

f->DrawText( 0, 0, "important text", TuiStyleDefault( ) )
f->BlendStyle( f->Area( ), TuiStylePatch( TuiDefaultColor( ), TuiDefaultColor( ), _
                                          TUIATTR_DIM, TUIATTR_DIM ) )
print scr.Back( )->At( 0, 0 )->st.HasAttr( TUIATTR_DIM )   '' true

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