From Clomosy Docs

No edit summary
No edit summary
Line 3: Line 3:
</div>
</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>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

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.

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.

Feature Use of 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. ProSearchEdit.png
clBarcodeReader ProSearchEdit1.clBarcodeReader = True; Used to enable the barcode scanning feature on the button in the search bar. The default value is False.

ProSearchEditBarcode.png

TargetListView ProSearchEdit1.TargetListView = ProListView1; The TargetListView property determines which TclProListView component the search component will operate on.

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

  • FontColor
  • FontSize
  • FontVertAlign
  • FontHorzAlign
  • Font.Style
  • BorderColor
  • BorderWidth
  • BackgroundColor
  • IsTransparent
  • IsFill
  • IsRound
  • RoundHeight
  • RoundWidth

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

    See Also