Skip to content

FormatTextAreaText

Narta Xaymar Dirks edited this page Oct 28, 2026 · 5 revisions
BlitzPlus

FormatTextAreaText

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

Description

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.

Differences

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

Examples

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

Media

FormatTextAreaText

Related Commands

AddTextAreaText, CreateTextArea, LockTextArea, SetTextAreaColor, SetTextAreaFont, SetTextAreaText, TextAreaText, TextFieldText

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally