From Clomosy Docs

No edit summary
No edit summary
 
(One intermediate revision by one other user 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">
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert">
procedure CallBarcodeReader(AComponent: TCLComponent);
procedure CallBarcodeReader(TargetObject: TCLComponent);
</div>
</div>


<span style="color:blue"><b>AComponent</b></span> : An object name (such as TclEdit or TclLabel) where textual data will be added must be specified. After the barcode scanning process is completed, the scanned code is transferred to the designated textual object.<br>
<span style="color:blue"><b>TargetObject</b></span> : An object name (such as TclEdit or TclLabel) where textual data will be added must be specified. After the barcode scanning process is completed, the scanned code is transferred to the designated textual object.<br>


This process enables the transfer of the detected serial number from barcodes into an electronic environment. Following this step, the transmitted information is analyzed on the computer or terminal, and the result is displayed, allowing data entry to be performed much faster and more accurately.<br>
This process enables the transfer of the detected serial number from barcodes into an electronic environment. Following this step, the transmitted information is analyzed on the computer or terminal, and the result is displayed, allowing data entry to be performed much faster and more accurately.<br>
Line 54: Line 54:
* [[Object Properties]]
* [[Object Properties]]
* [[AddNewEvent]]
* [[AddNewEvent]]
{{#seo:|description=Learn about CallBarcodeReader in Clomosy. A guide to integrating barcode scanning functionality into your mobile apps for efficient data capture.}}

Latest revision as of 14:57, 8 April 2025

TargetObject : An object name (such as TclEdit or TclLabel) where textual data will be added must be specified. After the barcode scanning process is completed, the scanned code is transferred to the designated textual object.

This process enables the transfer of the detected serial number from barcodes into an electronic environment. Following this step, the transmitted information is analyzed on the computer or terminal, and the result is displayed, allowing data entry to be performed much faster and more accurately.

Example
We also made an example of barcode reading in the AddNewEvent feature. There is no need for variable definition in the application for barcode. Now let's see on the example. Let's add a button and when this button is clicked, the barcode will be read and put into the label.

Var   
  MyForm:TclForm;
  testButton: TclButton;
  testLabel : TclLabel;
void ReadBarcode;
{
  MyForm.CallBarcodeReader(testLabel);
}

{
  MyForm = TclForm.Create(self);
  
  testButton = MyForm.AddNewButton(MyForm,'testButton','Read Barcode');
  testButton.TextSettings.Font.Size = 40;
  testButton.Align  =  alCenter;
  testButton.Height  =  50;
  testButton.Width  =  150;
  testButton.Margins.Bottom = 200;
  
  testLabel = MyForm.AddNewLabel(MyForm,'testLabel','Barcode Code');
  testLabel.Align  =  AlTop;
  testLabel.Width  =  100;
  testLabel.Height  = 50;
  testLabel.Margins.Top = 200;
  
  MyForm.AddNewEvent(testButton,tbeOnClick,'ReadBarcode');
  
  MyForm.Run;
}

Output:
BarcodeReader.png

See Also