Property: Data

Specifies a block of binary (bytes) data to encode it into the barcode symbol. Or 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 block of binary (bytes) data, and encode it into a barcode symbol. Or specifies the barcode text in AnsiString format. 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.

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.

The Barcode property of TBarcode2D component is of type string, for Delphi/C++ Builder 2009 or later, it 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 scheme (for example the UTF-8, UTF-16), you can specify the converted string in the Data property. For the Delphi/C++ Builder 2007 or early, the Barcode property is of type AnsiString in ANSI encoding, if you want to use other encoding scheme (for example the UTF-8, UTF-16), please specify the converted string in the Barcode property.

For the TBarcode2D_RSS14 and TBarcode2D_RSSLimited components, 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.

Note, if a 2D component (including the TBarcode2D_CCA, TBarcode2D_CCB, or TBarcode2D_CCC) together with a linear component (including the TBarcode2D_RSS14, TBarcode2D_RSSLimited, TBarcode2D_RSSExpanded, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_UPCA, TBarcode1D_EAN8, TBarcode1D_EAN13, or TBarcode1D_EAN128) is assembled to generate an EAN.UCC composite barcode symbol, the Data property of the 2D component only specifies the barcode text for the 2D component, and the Barcode or Data (only for Delphi/C++ Builder 2009 or later) property of the linear component only specifies the barcode text for the linear component.

Note:

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

Contents