Blitz3D+ Command Reference

SetTextAreaColor textarea,red,green,blue[,background]

Parameters

textarea - text area gadget

red,green,blue - colour components, 0 to 255

background (optional) - 0 colours the text itself (default); any other value colours the background

Description

Sets the text colour or the background colour of a text area.

Requires Extended language mode.

Two calls give the classic dark console look for a build-log pane:

SetTextAreaColor logArea,30,30,30,True  ; dark background
SetTextAreaColor logArea,220,220,220    ; light text

Background mode repaints the whole control. Text mode recolours all the text currently in the area - and because it reformats everything, it also wipes any per-range colours, bold and italic applied earlier with FormatTextAreaText. Set the base colour first, then apply highlights.

Text typed or added later uses the control's current formatting at the insertion point, so recolour after big programmatic rewrites if you need everything uniform. Values outside 0-255 are clamped.

See also: FormatTextAreaText, SetTextAreaFont, CreateTextArea, SetPanelColor.

Index