From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert"> | |||
function AddNewProSearchEdit(AComponent: TCLComponent; xName, xCaption: string): TClProSearchEdit; | |||
</div> | |||
<span style="color:blue"><b>AComponent</b></span> : The variable name of the defined component is written. Here you should write the component variable name of whatever your component will be in.<br> | |||
<span style="color:blue"><b>xName</b></span> : The name of the defined search edit should be written.<br> | |||
<span style="color:blue"><b>xCaption</b></span> : You can enter the chart title here.<br> | |||
< | |||
< | |||
<div class="alert alert-danger" role="alert" data-bs-theme="light"> | |||
Used only on the TclProListView object. | |||
</div> | |||
Search bar does not appear automatically in ProListView. It is a component created for this. This component also has the ability to search by scanning the barcode.<br> | |||
The TargetListView property determines which TclProListView component the search component will operate on. | <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 | |||
|- | |||
|TClProSearchEdit || ProSearchEdit1 : TClProSearchEdit; || A variable belonging to the TClProSearchEdit class is created. | |||
|- | |||
|AddNewProSearchEdit ||ProSearchEdit1 = Form1.AddNewProSearchEdit(Form1,'ProSearchEdit1','Search Something ...');|| A new TClProSearchEdit is added to the form. <b> [[File:ProSearchEdit.png|frameless|250px]] | |||
|- | |||
|clBarcodeReader ||ProSearchEdit1.clBarcodeReader = True; || Used to enable the barcode scanning feature on the button in the search bar. The default value is False.<br> | |||
[[File:ProSearchEditBarcode.png|frameless|250px]] | |||
|- | |||
|TargetListView ||ProSearchEdit1.TargetListView = ProListView1; || The TargetListView property determines which TclProListView component the search component will operate on. | |||
|} | |||
</div> | |||
In addition to the features of a standard search edit, TClProSearchEdit 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>FontColor</li> | |||
<li>FontSize</li> | |||
<li>FontVertAlign</li> | |||
<li>FontHorzAlign</li> | |||
<li>Font.Style</li> | |||
<li>BorderColor</li> | |||
<li>BorderWidth</li> | |||
<li>BackgroundColor</li> | |||
<li>IsTransparent</li> | |||
<li>IsFill</li> | |||
<li>IsRound</li> | |||
<li>RoundHeight</li> | |||
<li>RoundWidth</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>SetupComponent</b> and <b>clProSettings</b> properties, please refer to [[Pro Object Properties| the page]]. | ||
</div> | |||
<b>Example</b><br> | |||
: | For clProSettings:<br> | ||
<pre> | <pre> | ||
Var | Var | ||
MyForm:TclForm; | MyForm:TclForm; | ||
ListView1 : TClProListView; | ListView1 : TClProListView; | ||
| Line 43: | Line 74: | ||
{ | { | ||
searchEdt = MyForm.AddNewProSearchEdit(MyForm,'searchEdt','Search Something ...'); | searchEdt = MyForm.AddNewProSearchEdit(MyForm,'searchEdt','Search Something ...'); | ||
searchEdt.Align = alTop; | searchEdt.Align = alTop; | ||
searchEdt.Height = 40; | |||
searchEdt.Margins.Top = 15; | searchEdt.Margins.Top = 15; | ||
searchEdt.Margins.Left = 15; | searchEdt.Margins.Left = 15; | ||
searchEdt.Margins.Right = 15; | searchEdt.Margins.Right = 15; | ||
searchEdt.Margins.Bottom = 10; | searchEdt.Margins.Bottom = 10; | ||
searchEdt.clBarcodeReader = True; | searchEdt.clBarcodeReader = True; | ||
searchEdt.clProSettings.BorderColor = clAlphaColor.clHexToColor('#d6cdcd'); | |||
searchEdt.clProSettings.FontColor = clAlphaColor.clDarkorchid; | |||
searchEdt.clProSettings.FontSize = 12; | |||
searchEdt.clProSettings.FontVertAlign = palcenter;//palLeading , palCenter , palTrailing | |||
searchEdt.clProSettings.FontHorzAlign = palLeading; | |||
searchEdt.clProSettings.TextSettings.Font.Style = [fsBold,fsItalic]; | |||
searchEdt.clProSettings.IsTransparent = False; | |||
searchEdt.clProSettings.IsFill = True; | |||
searchEdt.clProSettings.IsRound = True; | |||
searchEdt.clProSettings.RoundHeight = 15; | |||
searchEdt.clProSettings.RoundWidth = 15; | |||
searchEdt.clProSettings.BorderWidth = 3; | |||
searchEdt.SetclProSettings(searchEdt.clProSettings); | |||
} | } | ||
| Line 82: | Line 127: | ||
</pre> | </pre> | ||
<h2> See Also </h2> | |||
< | * [[Components]] | ||
</ | |||
* [[ | |||
* [[Pro Object Properties]] | * [[Pro Object Properties]] | ||
* [[Object Properties]] | |||
Revision as of 13:58, 12 November 2024
function AddNewProSearchEdit(AComponent: TCLComponent; xName, xCaption: string): TClProSearchEdit;
AComponent : The variable name of the defined component is written. Here you should write the component variable name of whatever your component will be in.
xName : The name of the defined search edit should be written.
xCaption : You can enter the chart title here.
Used only on the TclProListView object.
Search bar does not appear automatically in ProListView. It is a component created for this. This component also has the ability to search by scanning the barcode.
In addition to the features of a standard search edit, TClProSearchEdit offers new and advanced features, which we will explain in detail below.
clProSettings Properties
To learn the purpose and usage of the SetupComponent and clProSettings properties, please refer to the page.
Example
For clProSettings:
Var
MyForm:TclForm;
ListView1 : TClProListView;
searchEdt : TClProSearchEdit;
void SetSearchEdit;
{
searchEdt = MyForm.AddNewProSearchEdit(MyForm,'searchEdt','Search Something ...');
searchEdt.Align = alTop;
searchEdt.Height = 40;
searchEdt.Margins.Top = 15;
searchEdt.Margins.Left = 15;
searchEdt.Margins.Right = 15;
searchEdt.Margins.Bottom = 10;
searchEdt.clBarcodeReader = True;
searchEdt.clProSettings.BorderColor = clAlphaColor.clHexToColor('#d6cdcd');
searchEdt.clProSettings.FontColor = clAlphaColor.clDarkorchid;
searchEdt.clProSettings.FontSize = 12;
searchEdt.clProSettings.FontVertAlign = palcenter;//palLeading , palCenter , palTrailing
searchEdt.clProSettings.FontHorzAlign = palLeading;
searchEdt.clProSettings.TextSettings.Font.Style = [fsBold,fsItalic];
searchEdt.clProSettings.IsTransparent = False;
searchEdt.clProSettings.IsFill = True;
searchEdt.clProSettings.IsRound = True;
searchEdt.clProSettings.RoundHeight = 15;
searchEdt.clProSettings.RoundWidth = 15;
searchEdt.clProSettings.BorderWidth = 3;
searchEdt.SetclProSettings(searchEdt.clProSettings);
}
void CreateListView;
{
ListView1 = MyForm.AddNewProListView(MyForm,'ListView1');
ListView1.Align = AlClient;
ListView1.Margins.Bottom = 20;
ListView1.Margins.Top = 20;
ListView1.Margins.Right = 20;
ListView1.Margins.Left = 20;
ListView1.clProSettings.ViewType = lvIcon; //(lvList, lvIcon, lvWaterFall)
ListView1.clProSettings.ColCount = 2;
ListView1.clProSettings.ItemHeight = 150;
ListView1.clProSettings.ItemWidth = 150;
ListView1.clProSettings.ItemSpace = 10;
ListView1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#098614');
ListView1.clProSettings.BorderWidth = 2;
ListView1.clProSettings.RoundHeight = 5;
ListView1.clProSettings.RoundWidth = 5;
ListView1.SetclProSettings(ListView1.clProSettings);
ListView1.ListType = 'horizontal';
searchEdt.TargetListView = ListView1;
}
{
MyForm = TclForm.Create(Self);
SetSearchEdit;
CreateListView;
MyForm.Run;
}