Skip to content

FormatTextAreaText

Claude edited this page Oct 26, 2026 · 5 revisions

FormatTextAreaText

Command Index · BlitzPlus · Text Areas

FormatTextAreaText textarea%, red%, green%, blue%, flags%, pos%=0, len%=-1, units%=1

Works in: BlitzPlus

Changes the color and style of a part of the text. The style is 1 for bold, 2 for italic and 3 for both, and 0 for plain. The part starts at a character or line and goes on for a number of them.

Graphics 320, 240, 32, 2
win  = CreateWindow("Format", 10, 10, 300, 150, Desktop(), 3)
area = CreateTextArea(10, 10, 270, 90, win)
SetGadgetText area, "Red green bold italic"
FormatTextAreaText area, 255, 0, 0, 0, 0, 3
FormatTextAreaText area, 0, 140, 0, 0, 4, 5
FormatTextAreaText area, 0, 0, 0, 1, 10, 4
FormatTextAreaText area, 0, 0, 160, 2, 15, 6
Repeat
Until WaitEvent() = $803

FormatTextAreaText

Parameter Type Default Description
textarea Int required Handle of a text area.
red Int required Red part of the text color, 0 to 255.
green Int required Green part of the text color, 0 to 255.
blue Int required Blue part of the text color, 0 to 255.
flags Int required
pos Int 0
len Int -1
units Int 1 1 counts characters, 2 counts lines. Defaults to 1.

Differences and known gaps:

  • Underline and strike-through are not supported, as in the original.

Related commands

Command Index · BlitzPlus · Text Areas

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

Clone this wiki locally