From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
</div> | </div> | ||
<span style="color:blue"><b>AComponent</b></span> : | <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 search edit should be written.<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 edit title here.<br> | <span style="color:blue"><b>xCaption</b></span> : You can enter the search edit title here.<br> | ||
<div class="alert alert-danger" role="alert" data-bs-theme="light"> | <div class="alert alert-danger" role="alert" data-bs-theme="light"> | ||
Revision as of 13:46, 14 November 2024
function AddNewProSearchEdit(AComponent: TCLComponent; xName, xCaption: string): TClProSearchEdit;
AComponent : Specifies the parent of the object to be defined.
xName : The name of the defined search edit should be written.
xCaption : You can enter the search edit 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;
}