From Clomosy Docs
(Created page with " AddNewProPanel(TComponent, xName, xCaption): TclProPanel The TclProPanel feature is a component that contains components that we use more than once in our application. You can define the component with the json structure. It has the features described below.<br> * Width * Height * PositionX * PositionY * Align * BackgroundColor * MarginTop * MarginBottom * MarginRight * MarginLeft * RoundHeight * RoundWidth * BorderColor * BorderWidth '''Code:'''<br> '''Var''' M...") |
No edit summary |
||
| (8 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 AddNewProPanel(AComponent: TCLComponent; xName: string): TclProPanel; | |||
</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 panel should be written.<br> | |||
Used to group and manage other components within a specific area on the form, TclProPanel allows developers to allocate a distinct section in the user interface where other components (such as buttons, text boxes, labels, etc.) can be placed. This makes it easier to control the layout and appearance of components on the form.<br> | |||
<div class="alert alert-info" role="alert" data-bs-theme="light"> | |||
Refer to the [[TclPanel]] page for standard panel 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 | |||
|- | |||
|TclProPanel || ProPanel1 : TclProPanel; || A variable belonging to the TclPanel class is created. | |||
|- | |||
|AddNewProPanel ||ProPanel1 = Form1.AddNewProPanel(Form1,'ProPanel1'); || A new TclProPanel is added to the form. | |||
|} | |||
</div> | |||
In addition to the features of a standard panel, TclProPanel 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>BackgroundColor</li> | |||
<li>BorderColor</li> | |||
<li>IsTransparent</li> | |||
<li>IsFill</li> | |||
<li>RoundHeight</li> | |||
<li>RoundWidth</li> | |||
<li>IsRound</li> | |||
<li>BorderWidth</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> properties, please refer to [[Pro Object Properties| the page]]. | |||
</div> | |||
<b>Example</b><br> | |||
<pre> | |||
Var | |||
Form1:TclForm; | |||
ProPanel1 : TclProPanel; | |||
{ | |||
Form1=TclForm.Create(self); | |||
ProPanel1=Form1.AddNewProPanel(Form1,'ProPanel1'); | |||
ProPanel1.Align = alCenter; | |||
ProPanel1.Width = 200; | |||
ProPanel1.Height = 280; | |||
ProPanel1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#fabd2'); | |||
ProPanel1.clProSettings.RoundHeight = 10; | |||
ProPanel1.clProSettings.RoundWidth = 10; | |||
ProPanel1.clProSettings.BorderWidth = 2; | |||
ProPanel1.clProSettings.IsFill = True; | |||
ProPanel1.clProSettings.IsRound = True; | |||
ProPanel1.SetclProSettings(ProPanel1.clProSettings); | |||
Form1.Run; | |||
} | |||
</pre> | |||
<h2> See Also </h2> | |||
* [[Components]] | |||
* [[Pro Object Properties]] | |||
* [[Object Properties]] | |||
{{#seo:|title=TclProPanel Using in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=Discover TclProPanel in Clomosy for advanced UI grouping, customization, and flexible layouts.}} | |||
Latest revision as of 08:40, 16 April 2025
function AddNewProPanel(AComponent: TCLComponent; xName: string): TclProPanel;
AComponent : Specifies the parent of the object to be defined.
xName : The name of the defined panel should be written.
Used to group and manage other components within a specific area on the form, TclProPanel allows developers to allocate a distinct section in the user interface where other components (such as buttons, text boxes, labels, etc.) can be placed. This makes it easier to control the layout and appearance of components on the form.
Refer to the TclPanel page for standard panel usage.
| Feature | Use of | Definition |
|---|---|---|
| TclProPanel | ProPanel1 : TclProPanel; | A variable belonging to the TclPanel class is created. |
| AddNewProPanel | ProPanel1 = Form1.AddNewProPanel(Form1,'ProPanel1'); | A new TclProPanel is added to the form. |
In addition to the features of a standard panel, TclProPanel offers new and advanced features, which we will explain in detail below.
clProSettings Properties
To learn the purpose and usage of the clProSettings properties, please refer to the page.
Example
Var
Form1:TclForm;
ProPanel1 : TclProPanel;
{
Form1=TclForm.Create(self);
ProPanel1=Form1.AddNewProPanel(Form1,'ProPanel1');
ProPanel1.Align = alCenter;
ProPanel1.Width = 200;
ProPanel1.Height = 280;
ProPanel1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#fabd2');
ProPanel1.clProSettings.RoundHeight = 10;
ProPanel1.clProSettings.RoundWidth = 10;
ProPanel1.clProSettings.BorderWidth = 2;
ProPanel1.clProSettings.IsFill = True;
ProPanel1.clProSettings.IsRound = True;
ProPanel1.SetclProSettings(ProPanel1.clProSettings);
Form1.Run;
}