From Clomosy Docs
(Created page with " AddNewProLabel(TComponent, xName, xCaption): TClProLabel You can use all of the AddNewLabel properties. Apart from that, there are special uses for ProLabel. Background Color, Text Bold, Border Color, AutoSize etc. There is a simpler way to use these parameters. This is because the json structure is available. You can use properties defined with json structure. Parameters used:<br> * caption * Width * Height * PositionX * PositionY * Align * TextColor * BackgroundColor...") |
No edit summary |
||
| (9 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert"> | |||
function AddNewProLabel(AComponent: TCLComponent; xName, xCaption: string): TClProLabel; | |||
</div> | |||
<span style="color:blue"><b>AComponent</b></span> : Specifies the parent of the object to be defined.<br> | |||
<span style="color:blue"><b>xName</b></span> : The name of the defined label should be written.<br> | |||
< | |||
<span style="color:blue"><b>xCaption</b></span> : You can enter the label title here.<br> | |||
< | |||
It creates a text label used to provide explanations or information in the user interface. TclProLabel is preferred for labeling other components on the form or providing information to the user.<br> | |||
< | |||
<div class="alert alert-info" role="alert" data-bs-theme="light"> | |||
Refer to the [[TclLabel]] page for standard label usage. | |||
</div> | |||
</ | |||
<div class="table-responsive"> | |||
{| class="wikitable" style="border: 2px solid #c3d7e0" | |||
! style="background-color: #c3d7e0"| Feature !!style="background-color: #c3d7e0"| Use of !!style="background-color: #c3d7e0"| Definition | |||
|- | |||
|TclProLabel || ProLabel1 : TclLabel; || A variable belonging to the TclProLabel class is created. | |||
|- | |||
|AddNewProLabel || ProLabel1 = Form1.AddNewProLabel(Form1,'ProLabel1','Test ProLabel Caption'); || A new TclProLabel is added to the form. | |||
|} | |||
</div> | |||
In addition to the features of a standard label, TclProLabel offers new and advanced features, which we will explain in detail below.<br> | |||
<div class="row"> | |||
<div class="col-lg-6"> | |||
<div class="card d-flex flex-column justify-content-start gap-1 mb-3 h-100" style="padding: 3;"> | |||
<div style="font-size: 16px;font-weight: bold;text-align:left;"> | |||
clProSettings Properties | |||
</div> | |||
<div style="font-size: 14px;font-weight: normal;text-align:justify; max-width: 350px;"> | |||
<li>TextSettings</li> | |||
<li>FontColor</li> | |||
<li>FontSize</li> | |||
<li>FontVertAlign</li> | |||
<li>FontHorzAlign</li> | |||
<li>BackgroundColor</li> | |||
<li>BorderColor</li> | |||
<li>IsTransparent</li> | |||
<li>IsFill</li> | |||
<li>RoundHeight</li> | |||
<li>RoundWidth</li> | |||
<li>IsRound</li> | |||
<li>BorderWidth</li> | |||
<li>AutoSize</li> | |||
<li>WordWrap</li> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<br> | |||
<div class="alert alert-warning" role="alert" data-bs-theme="light"> | |||
To learn the purpose and usage of the <b>clProSettings</b> property, please refer to [[Pro Object Properties| the page]]. | |||
</div> | |||
<b>Example</b><br> | |||
<pre> | |||
Var | |||
Form1:TclForm; | |||
Label1: TClProLabel; | |||
void setLabel; | |||
{ | |||
Label1 = Form1.AddNewProLabel(Form1,'Label1','Clomosy PROLABEL'); | |||
Label1.Align = alCenter; | |||
Label1.Width = 150; | |||
Label1.Height = 30; | |||
Label1.clProSettings.FontColor = clAlphaColor.clHexToColor('#f5428d'); | |||
Label1.clProSettings.FontSize = 12; | |||
Label1.clProSettings.FontVertAlign = palcenter; | |||
Label1.clProSettings.FontHorzAlign = palLeading; | |||
Label1.clProSettings.TextSettings.Font.Style = [fsBold]; | |||
Label1.clProSettings.IsFill = True; | |||
Label1.clProSettings.IsRound = True; | |||
Label1.SetclProSettings(Label1.clProSettings); | |||
} | |||
{ | |||
Form1 = TclForm.Create(Self); | |||
setLabel; | |||
Form1.Run; | |||
} | |||
</pre> | |||
<h2> See Also </h2> | |||
* [[Components]] | |||
* [[Pro Object Properties]] | |||
* [[Object Properties]] | |||
{{#seo:|title=TclProLabel Using - Clomosy Docs}} | |||
{{#seo:|description=Explore TclProLabel on Clomosy! Learn how to implement and customize professional labels in your applications with ease.}} | |||
Latest revision as of 15:12, 11 April 2025
function AddNewProLabel(AComponent: TCLComponent; xName, xCaption: string): TClProLabel;
AComponent : Specifies the parent of the object to be defined.
xName : The name of the defined label should be written.
xCaption : You can enter the label title here.
It creates a text label used to provide explanations or information in the user interface. TclProLabel is preferred for labeling other components on the form or providing information to the user.
Refer to the TclLabel page for standard label usage.
| Feature | Use of | Definition |
|---|---|---|
| TclProLabel | ProLabel1 : TclLabel; | A variable belonging to the TclProLabel class is created. |
| AddNewProLabel | ProLabel1 = Form1.AddNewProLabel(Form1,'ProLabel1','Test ProLabel Caption'); | A new TclProLabel is added to the form. |
In addition to the features of a standard label, TclProLabel offers new and advanced features, which we will explain in detail below.
clProSettings Properties
To learn the purpose and usage of the clProSettings property, please refer to the page.
Example
Var
Form1:TclForm;
Label1: TClProLabel;
void setLabel;
{
Label1 = Form1.AddNewProLabel(Form1,'Label1','Clomosy PROLABEL');
Label1.Align = alCenter;
Label1.Width = 150;
Label1.Height = 30;
Label1.clProSettings.FontColor = clAlphaColor.clHexToColor('#f5428d');
Label1.clProSettings.FontSize = 12;
Label1.clProSettings.FontVertAlign = palcenter;
Label1.clProSettings.FontHorzAlign = palLeading;
Label1.clProSettings.TextSettings.Font.Style = [fsBold];
Label1.clProSettings.IsFill = True;
Label1.clProSettings.IsRound = True;
Label1.SetclProSettings(Label1.clProSettings);
}
{
Form1 = TclForm.Create(Self);
setLabel;
Form1.Run;
}