From Clomosy Docs

No edit summary
No edit summary
 
Line 34: Line 34:
</div>
</div>
<div style="font-size: 14px;font-weight: normal;text-align:justify; max-width: 350px;">
<div style="font-size: 14px;font-weight: normal;text-align:justify; max-width: 350px;">
<li>TextSettings</li>
<li>FontColor</li>
<li>FontColor</li>
<li>FontSize</li>
<li>FontSize</li>
<li>FontVertAlign</li>
<li>FontVertAlign</li>
<li>FontHorzAlign</li>
<li>FontHorzAlign</li>
<li>Font.Style</li>
<li>BackgroundColor</li>
<li>BorderColor</li>
<li>BorderColor</li>
<li>BorderWidth</li>
<li>BackgroundColor</li>
<li>IsTransparent</li>
<li>IsTransparent</li>
<li>IsFill</li>
<li>IsFill</li>
<li>IsRound</li>
<li>RoundHeight</li>
<li>RoundHeight</li>
<li>RoundWidth</li>
<li>RoundWidth</li>
</div>
<li>IsRound</li>
</div>
</div>
<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;">
SetupComponent Properties
</div>
<div style="font-size: 14px;font-weight: normal;text-align:justify; max-width: 350px;">
<li>Caption</li>
<li>Width</li>
<li>Height</li>
<li>PositionX</li>
<li>PositionY</li>
<li>Align</li>
<li>TextColor</li>
<li>BackgroundColor</li>
<li>TextSize</li>
<li>TextVerticalAlign</li>
<li>TextHorizontalAlign</li>
<li>TextBold</li>
<li>MarginTop</li>
<li>MarginBottom</li>
<li>MarginRight</li>
<li>MarginLeft</li>
<li>RoundHeight</li>
<li>RoundWidth</li>
<li>BorderColor</li>
<li>BorderWidth</li>
<li>BorderWidth</li>
<li>AutoSize</li>
<li>AutoSize</li>
<li>WordWrap</li>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>


<div class="alert alert-warning" role="alert" data-bs-theme="light">
<div class="alert alert-warning" role="alert" data-bs-theme="light">
To learn the purpose and usage of the <b>SetupComponent</b> and <b>clProSettings</b> properties, please refer to [[Pro Object Properties| the page]].
To learn the purpose and usage of the <b>clProSettings</b> property, please refer to [[Pro Object Properties| the page]].
</div>
</div>


<b>Example</b><br>
<b>Example</b><br>


For clProSettings:<br>
<pre>
<pre>
Var   
Var   
Line 109: Line 80:
   Label1.clProSettings.IsRound = True;
   Label1.clProSettings.IsRound = True;
   Label1.SetclProSettings(Label1.clProSettings);
   Label1.SetclProSettings(Label1.clProSettings);
}
{
  Form1 = TclForm.Create(Self);
  setLabel;
  Form1.Run;
}
</pre>
For SetupComponent:<br>
<pre>
Var 
  Form1:TclForm;
  Label1: TClProLabel;
void setLabel;
{
  Label1 = Form1.AddNewProLabel(Form1,'Label1','Clomosy PROLABEL');
 
  clComponent.SetupComponent(Label1,'{
  "Align" : "Center",
  "Width":150,
  "Height":30,
  "TextColor":"#f5428d",
  "TextSize":12,
  "TextBold":"yes",
  "TextVerticalAlign":"center",
  "TextHorizontalAlign":"bottom"
}');
 
}
}



Latest revision as of 15:12, 11 April 2025

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.

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

  • TextSettings
  • FontColor
  • FontSize
  • FontVertAlign
  • FontHorzAlign
  • BackgroundColor
  • BorderColor
  • IsTransparent
  • IsFill
  • RoundHeight
  • RoundWidth
  • IsRound
  • BorderWidth
  • AutoSize
  • WordWrap

  • 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;
    }
    

    See Also