Skip to content

SetTextAreaColor

Claude edited this page Oct 26, 2026 · 5 revisions

SetTextAreaColor

Command Index · BlitzPlus · Text Areas

SetTextAreaColor textarea%, red%, green%, blue%, background%=0

Works in: BlitzPlus

Sets the color of the text, or with the last parameter the color of the background, of the whole text area.

Graphics 320, 240, 32, 2
win  = CreateWindow("Colors", 10, 10, 300, 150, Desktop(), 3)
area = CreateTextArea(10, 10, 270, 90, win)
SetGadgetText area, "Green on black"
SetTextAreaColor area, 0, 0, 0, 1
SetTextAreaColor area, 0, 255, 0
Repeat
Until WaitEvent() = $803

SetTextAreaColor

Parameter Type Default Description
textarea Int required Handle of a text area.
red Int required Red part, 0 to 255.
green Int required Green part, 0 to 255.
blue Int required Blue part, 0 to 255.
background Int 0 0 sets the text color, 1 sets the background color. Defaults to 0.

Related commands

Command Index · BlitzPlus · Text Areas

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally