Event: OnEncode

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, DrawToSize, Print, PrintSize, GetParity (only TBarcode2D_QRCode), GetCheckSum (only TBarcode2D_PDF417), GetCheckSum (only TBarcode2D_MicroPDF417) method is called.

It's useful if you want to encode the barcode text in your own encoding scheme before generate the barcode symbol. See also the "How to encode the UNICODE text in a 2D barcode symbol" article.

Syntax:

type

{ Defined in the pCore2D unit }

TOnEncode = procedure (Sender: TObject; var Data: AnsiString; Barcode: string) of object;

property OnEncode: TOnEncode;

Parameters:
Note:

The event doesn't occur when the DrawTo (syntax 3), DrawToSize (syntax 3), Print (syntax 3), PrintSize (syntax 3), GetParity (syntax 2) (only TBarcode2D_QRCode), GetCheckSum (syntax 2) (only TBarcode2D_PDF417), or GetCheckSum (syntax 2) (only TBarcode2D_MicroPDF417) method is called.

Contents