← Back to Index

TFlexFMXAdvancedHTMLLabel

Label control with support for basic HTML formatting tags.

Key Properties

HTMLText: string
Text with HTML formatting tags.
WordWrap: Boolean
Enable automatic word wrapping (preserves HTML formatting).
TextSettings: TTextSettings
Font family, size, color, and style settings.
AutoSize: Boolean
Automatically adjust height to fit content.
VertTextAlign / HorzTextAlign: TTextAlign
Vertical and horizontal text alignment.

Supported HTML Tags

Usage Examples

Basic HTML

Label1.HTMLText := 'This is <b>bold</b> and this is <i>italic</i>.';

Font Sizes

Label1.HTMLText := '<font size="24">Large</font> and <font size="12">small</font>.';

Multi-line with Formatting

Label1.HTMLText := 'Line 1: <b>Important</b><br>' +
                  'Line 2: <i>Additional info</i><br>' +
                  'Line 3: <s>Deprecated</s>';
Label1.WordWrap := True;

Mixed Formatting

Label1.HTMLText := 'Status: <b><font size="18">ACTIVE</font></b>';

Events

Notes

← Back to Index