From Clomosy Docs

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