Home

TLabel

TLabel is a standard user interface component used to display static, non-editable text in graphical applications. It is part of the Visual Component Library (VCL) in Delphi and the Lazarus Component Library (LCL) in Free Pascal. TLabel inherits from a generic label class and provides text rendering, font styling, and color customization for displaying captions on forms or dialogs. It is commonly employed to describe or identify other controls such as input fields, check boxes, or buttons.

The primary role of TLabel is to present the Caption text. It can be associated with another

Appearance and layout are managed through properties that control sizing and alignment. AutoSize determines whether the

TLabel supports user interaction through events such as OnClick and various mouse-related events, enabling clickable labels

control
so
that
interacting
with
the
label
affects
that
control,
for
example
by
transferring
focus
when
the
label
is
clicked.
This
improves
accessibility
and
makes
forms
easier
to
navigate.
Labels
can
also
include
keyboard
mnemonics
via
ampersand
markers
in
the
caption,
enabling
quick
access
to
the
related
control.
label
resizes
to
fit
its
caption,
and
Alignment
defines
how
the
text
is
aligned
within
the
label’s
bounds.
Labels
can
be
drawn
transparently
or
with
a
background
consistent
with
their
parent
container,
and
they
inherit
font
and
color
properties
from
their
container,
allowing
consistent
styling
with
other
controls.
or
dynamic
behavior
in
response
to
user
input.
It
remains
a
lightweight,
read-only
text
element
suitable
for
labeling
and
descriptive
hints
within
forms
and
dialogs.
See
also:
TCustomLabel.