Property: Data

Specifies the barcode text in the AnsiString format.

Syntax:

property Data: AnsiString;

Description:

If you use the Delphi/C++ Builder 2009 or later, you can use the property to specify a barcode text in AnsiString format, and encode it into the barcode symbol. If the property AutoCheckDigit is set to true, the check digit doesn't need to be entered in the here, otherwise the check digit can be specified by you in here. The OnChange event will occur when the property value is changed. The OnInvalidDataChar event will occur if there is any invalid character in the Data property value, and the OnInvalidDataLength event will occur if the length of the Data property value is invalid.

For the TBarcode1D_Code128 and the TBarcode1D_EAN128 components, you can use the property to encode a block of binary (bytes) data under Delphi/C++ Builder 2009 or later. If you want to encode a block of binary (bytes) data into a barcode symbol under Delphi/C++ Builder 2007 or early, please specify it in the Barcode property.

If you use the TBarcode1D_Code128 and the TBarcode1D_EAN128 components in the Delphi/C++ Builder 2009 or later, the Barcode is in fact an UnicodeString instead of AnsiString. By default, the unicode string will be converted to an ANSI encoding string, then be encoded into the barcode symbol. If you want to use other encoding format (for example the UTF-8, UTF-16), please specify the converted string in the Data property or convert it in the OnEncode event. If you use them in the Delphi/C++ Builder 2007 or early, the Barcode property is an AnsiSting in ANSI encoding. If you want to use other encoding format (for example the UTF-8, UTF-16), please convert it in the OnEncode event, or specify the converted string in the Barcode property.

For the TBarcode1D_OneCode component, first 20 characters are the Tracking (It is right padded with zeroes to 20 characters), then come the Routing.

For the TBarcode1D_FIM component, it is single character that denotes the FIM type, form "A" to "E", the "E" character dnotes an empty barcode symbol. An OnInvalidDataChar event will occur if you set the property to other character, and an OnInvalidDataLength event will occur if you set the property to 2 or more characters, or set it to empty.

For the TBarcode1D_Patch component, it is single character that denotes the Ptach type, and it can be set to "0", "1", "2", "3", "4", "6", and "T", the "0" character dnotes an empty barcode symbol. An OnInvalidDataChar event will occur if you set the property to other character, and an OnInvalidDataLength event will occur if you set the property to 2 or more characters, or set it to empty.

For the TBarcode1D_Code32 component, First "A" character does not need to be entered in the property. Also, for the TBarcode1D_PZN component, First "PZN" characters do not need to be entered in the property.

Note:

The property is available only for the Delphi/C++ Builder 2009 or later.

For the TBarcode1D_Code128 and TBarcode1D_EAN128 components, the "\" character is used as a escape prefix, so if you want to encode the "\" character, please use the "\\" instead of it.

Contents