Skip to content



Below is a list of the most important properties methods and events for the TWebLabel. TWebLabel is a label control similar to a VCL TLabel.

Designtime Runtime

HTML template tag

The HTML tag the component can be associated with in an HTML template. Assign the ID attribute with a unique value and set the identical value to the ElementID property. Detailed information can be found in the Use of HTML templates topic.

HTML tag <DIV ID=”UniqueID”></DIV>
ElementID UniqueID

Properties for TWebLabel

Property Description
Alignment Sets the alignment of the text within the label control
AutoSize When true, the size of the label adapts to the text in the label
Caption Sets the text for the label
ElementClassName Optionally sets the CSS classname for the label when styling via CSS is used
ElementID Optionally sets the HTML element ID for a HTML element in the form HTML file the label needs to be connected with. When connected, no new label is created but the Delphi class is connected with the existing HTML element in the form HTML file
EllipsisPosition Sets the type of ellipsis to use for showing the text when it doesn't fit in the label rectangle.
epNone: no ellipsis used
epEndEllipsis: ellipsis at the end of the text
epPathEllipsis: label text contains a path name and ellipsis is set taking a file path in account
epWordEllipsis: ellipsis is positioned at word boundary
Layout Sets the vertical text position in the label
tlTop: top aligned
tlCenter: center aligned
tlBottom: bottom aligned
Transparent When true, no background color is used
WordWrap When true, the text is rendered with automatic wordwrap

Events for TWebLabel

Property Description
OnClick Triggered when the mouse is clicked on the label
OnDblClick Triggered when the mouse is double-clicked on the label