Fandom

Delphi Programming

TLabel Class

2,918pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

TLabelEdit

Unit StdCtrls

DescriptionEdit

TLabel is a delphi component reference used to display text.
Not having an interface for direct interaction with the user,the text is handled by code.

Technical CommentsEdit

(Known issues / Documentation clarifications / Things to be aware of)

ExamplesEdit

Controling Labels by code.Edit





Working with a TLabel Caption,


some ways to display text in the component.






Label1.Caption := 'Hello Caption !!!';


//Give or Change its Caption






Label1.Caption := 'Hello Caption !!!' +#13+


'Second line of Caption here';


//Give or Change its Caption with multiple lines






Label1.Caption := Label2.Caption;


//Coping a Text from another Label Caption






No aditional information.







Working with a Label appearance,


some ways to change the display of the text in the component.






Label1.Font.Name := 'Arial';


//Give or Change the Text Font of its Caption






Label1.Font.Size := 12;


//Give or Change the Text Size of its Caption






Label1.Height := 40;


//Give or Change the Height of a Label






Label1.Width := 200;


//Give or Change the Width of a Label






Label1.AutoSize := TRUE;


Label1.AutoSize := FALSE;


//To set the AutoSize feature of a Label






Label1.WordWrap := TRUE;


Label1.WordWrap := FALSE;


//To set the WordWrap feature of a Label






Label1.Color := clBlue;


Label1.Color := $00FF8000;


//Change Background color of a Label






Label1.Font.Color := clYellow;


Label1.Font.Color := $00808040;


//Change Background color of a Label






No aditional information.


See AlsoEdit

(Please provide links to items specifically related to this item.)

User Comments/TipsEdit

Also on Fandom

Random Wiki