From Clomosy Docs
(Created page with " AddNewProEdit(TComponent, xName, xPromptText): TclProEdit The text is the input field. Apart from the features in the standard Edit component, we can add features such as background color, border formatting. Below are all the features.<br> * caption * Width * Height * PositionX * PositionY * Align * TextColor * BackgroundColor * TextSize * TextVerticalAlign * TextHorizontalAlign * TextBold * MarginTop * MarginBottom * MarginRight * MarginLeft * RoundHeight * RoundWidth...") |
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 AddNewProEdit(AComponent: TCLComponent; xName, xPromptText: string): TclProEdit; | |||
</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 TclProEdit object must be written.<br> | |||
</ | |||
< | <span style="color:blue"><b>xPromptText</b></span> : A hint or message to be displayed when the Text property is empty.<br> | ||
The TclProEdit component is a text box used to allow users to enter or edit text on a form. When placed on the form, the TclProEdit component creates an area where users can input the required information. <br> | |||
<div class="alert alert-info" role="alert" data-bs-theme="light"> | |||
Refer to the [[TclEdit]] page for standard edit object 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 | |||
|- | |||
|TclProEdit ||ProEdit1 : TclProEdit; ||A variable belonging to the TclProEdit class is created. | |||
|- | |||
|AddNewProEdit||ProEdit1 = Form1.AddNewProEdit(Form1,'ProEdit1','Test ProEdit Message'); || A new edit component is added to the form. | |||
|} | |||
</div> | |||
In addition to the features of a standard edit, TclProEDİT 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> | |||
[[File:ProEdit.png|frameless| | <li>FontColor</li> | ||
<li> FontName </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>PictureAutoFit</li> | |||
<li>PictureStretch</li> | |||
<li>PictureSource</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; | |||
Edit1: TClProEdit; | |||
Img1 : TCProImage; | |||
void SetEditAndImg; | |||
{ | |||
Edit1 = Form1.AddNewProEdit(Form1,'Edit1','Phone Number'); | |||
Edit1.Align = alCenter; | |||
Edit1.Width = 180; | |||
Edit1.Height = 45; | |||
Edit1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#fabd2'); | |||
Edit1.clProSettings.FontColor = clAlphaColor.clHexToColor('#000000'); | |||
Edit1.clProSettings.RoundHeight = 15; | |||
Edit1.clProSettings.RoundWidth = 15; | |||
Edit1.clProSettings.BorderWidth = 3; | |||
Edit1.clProSettings.FontSize = 12; | |||
Edit1.clProSettings.FontVertAlign = palcenter;//palLeading , palCenter , palTrailing | |||
Edit1.clProSettings.FontHorzAlign = palCenter; | |||
Edit1.clProSettings.TextSettings.Font.Style = [fsBold,fsItalic]; | |||
Edit1.clProSettings.IsFill = True; | |||
Edit1.clProSettings.IsRound = True; | |||
Edit1.SetclProSettings(Edit1.clProSettings); | |||
Img1 = Form1.AddNewProImage(Edit1,'Img1'); | |||
Img1.Align = AlLeft; | |||
Img1.Width = 25; | |||
Img1.Margins.Left = 5; | |||
Img1.Margins.Top = 5; | |||
Img1.Margins.Bottom = 5; | |||
Form1.SetImage(Img1,'https://clomosy.com/demos/phone.png'); | |||
} | |||
{ | |||
Form1 = TclForm.Create(Self); | |||
SetEditAndImg; | |||
Form1.Run; | |||
} | |||
</pre> | |||
<b>Output:</b><br> | |||
[[File:ProEdit.png|frameless|350px]] | |||
<h2> See Also </h2> | |||
* [[Components]] | |||
* [[Pro Object Properties]] | |||
* [[Object Properties]] | |||
{{#seo:|title=TClProEdit Using in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=Learn how the TclProEdit component in Clomosy is used to create editable text boxes with customizable properties like font color, size, and more.}} | |||
Latest revision as of 08:42, 16 April 2025
function AddNewProEdit(AComponent: TCLComponent; xName, xPromptText: string): TclProEdit;
AComponent : Specifies the parent of the object to be defined.
xName : The name of the defined TclProEdit object must be written.
xPromptText : A hint or message to be displayed when the Text property is empty.
The TclProEdit component is a text box used to allow users to enter or edit text on a form. When placed on the form, the TclProEdit component creates an area where users can input the required information.
Refer to the TclEdit page for standard edit object usage.
| Feature | Use of | Definition |
|---|---|---|
| TclProEdit | ProEdit1 : TclProEdit; | A variable belonging to the TclProEdit class is created. |
| AddNewProEdit | ProEdit1 = Form1.AddNewProEdit(Form1,'ProEdit1','Test ProEdit Message'); | A new edit component is added to the form. |
In addition to the features of a standard edit, TclProEDİT 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;
Edit1: TClProEdit;
Img1 : TCProImage;
void SetEditAndImg;
{
Edit1 = Form1.AddNewProEdit(Form1,'Edit1','Phone Number');
Edit1.Align = alCenter;
Edit1.Width = 180;
Edit1.Height = 45;
Edit1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#fabd2');
Edit1.clProSettings.FontColor = clAlphaColor.clHexToColor('#000000');
Edit1.clProSettings.RoundHeight = 15;
Edit1.clProSettings.RoundWidth = 15;
Edit1.clProSettings.BorderWidth = 3;
Edit1.clProSettings.FontSize = 12;
Edit1.clProSettings.FontVertAlign = palcenter;//palLeading , palCenter , palTrailing
Edit1.clProSettings.FontHorzAlign = palCenter;
Edit1.clProSettings.TextSettings.Font.Style = [fsBold,fsItalic];
Edit1.clProSettings.IsFill = True;
Edit1.clProSettings.IsRound = True;
Edit1.SetclProSettings(Edit1.clProSettings);
Img1 = Form1.AddNewProImage(Edit1,'Img1');
Img1.Align = AlLeft;
Img1.Width = 25;
Img1.Margins.Left = 5;
Img1.Margins.Top = 5;
Img1.Margins.Bottom = 5;
Form1.SetImage(Img1,'https://clomosy.com/demos/phone.png');
}
{
Form1 = TclForm.Create(Self);
SetEditAndImg;
Form1.Run;
}