(TBarcode1D_Code128, TBarcode1D_EAN128)
For the TBarcode1D_Code128 and TBarcode1D_EAB128 components, you can encode a block of binary (bytes) data into the barcode symbol. The event is useful to decode the text from the block of binary (bytes) data in order to output it as the barcode text into the barcode symbol.
For the Delphi/C++ Builder 2007 or early, it occurs when the value of Barcode property is changed and the component is updating its barcode symbol, or one of the Clear, Draw, Size, DrawTo (Syntax 1 and 2), DrawToSize (Syntax 1 and 2), Print (Syntax 1 and 2), PrintSize (Syntax 1 and 2) method is called. Note, the event function is required only when you encode a block of binary (bytes) data into the barcode symbol.
For the Delphi/C++ Builder 2009 or later, if you use the Data property to encode a block of binary (bytes) data into the barcode symbol, it occurs when the value of Data property is changed and the component is updating its barcode symbol, or one of the Clear, Draw, Size, DrawTo (Syntax 1), DrawToSize (Syntax 1), Print (Syntax 1), PrintSize (Syntax 1) method is called. Also, it occurs when one of the DrawTo (Syntax 3), DrawToSize (Syntax 3), Print (Syntax 3), PrintSize (Syntax 3) method is called.
type
{ Defined in the pCode128 unit }
TOnDecodeText = procedure (Sender: TObject; var BarcodeText: string; Data: AnsiString); of object;
property OnDecodeText: TOnDecodeText;
Sender: TObject; It is the object whose event handler is called.
BarcodeText: String; The text that's decoded from the block of binary (bytes) data should be returned in the parameter. It will be output as the barcode text in the barcode symbol if the DisplayText property is not set to dtNone. By default, the block of binary (bytes) data will be as the barcode text directly. For the Delphi/C++ Builder 2009 or later, it will be converted to the UNICODE string firstly.
Data: AnsiString; Its is the block of binary (bytes) data.
For Delphi/C++ Bilder 2007 or early. If the Barcode property is changed, or one of the Clear, Draw, Size, DrawTo (Syntax 1), DrawToSize (Syntax 1), Print (Syntax 1), PrintSize (Syntax 1) method is called, it's equal to the value of the Barcode property. If one of the DrawTo (Syntax 2), DrawToSize (Syntax 2), Print (Syntax 2), PrintSize (Syntax 2) method is called, it's equal to the value of its Barcode parameter.
For Delphi/C++ Bilder 2009 or later. If the Data property is changed, or one of the Clear, Draw, Size, DrawTo (Syntax 1), DrawToSize (Syntax 1), Print (Syntax 1), PrintSize (Syntax 1) method is called, it's equal to the value of the Data property. If one of the DrawTo (Syntax 3), DrawToSize (Syntax 3), Print (Syntax 3), PrintSize (Syntax 3) method is called, it's equal to the value of its Data parameter.
Note: If the AutoCheckDigit property is set to true, and the DisplayText property is set to dtFullEncoded, the check digit will be inserted to the parameter too.
For the Delphi/C++ Builder 2009 or later, the event doesn't occur when the DrawTo (syntax 2), DrawToSize (syntax 2), Print (syntax 2), or PrintSize (syntax 2) method is called.