Redraws current barcode symbol in the TImage, TQRImage, or TQRGzImage control that's specified by the Image property.
function Draw(ReEncode: Boolean = False): Boolean; virtual;
The method redraws the barcode symbol to the TImage, TQRImage, or TQRGzImage control that's specified by the Image property. The barcode symbol is specified in the properties of this barcode component.
For the TBarcode2D_CCA, TBarcode2D_CCB, and TBarcode2D_CCC barcode components, if the Linear property is set, the 2D symbol and the linear symbol are assembled to generate an EAN.UCC composite barcode symbol. Both of them will be drawn in the TImage, TQRImage, or TQRGzImage control.
ReEncode: Boolean; Normally, the barcode text will not be encoded again when call the method, the previous encoded data will be used to present the barcode symbol. If the parameter is set to true, the barcode text will be encoded again before present the barcode symbol. It defaults to false if the parameter is not provided.
If you changed the OnEncode event handle, please call the method and set the parameter to true (please call the Clear method firstly).
For the Delphi/C++ Builder 2007 or early, if the length of Barcode property value is invalid, or there is any invalid character in the Barcode property value, the return value is false. Corresponding to the OnInvalidLength event or the OnInvalidChar event will occur.
For Delphi/C++ Builder 2009 or later, if you use the Barcode property to specify the barcode text, when the length of Barcode property value is invalid, or there is any invalid character in the Barcode property value, the return value is false. Corresponding to the OnInvalidLength event or the OnInvalidChar event will occur. If you use the Data property to specify the barcode text, when the length of Data property value is invalid, or there is any invalid character in the Data property value, the return value is false. Corresponding to the OnInvalidDataLength event or the OnInvalidDataChar event will occur.
For the TBarcode2D_CCA, TBarcode2D_CCB, and TBarcode2D_CCC components, if the Linear property is set, and the length of its Barcode or Data (only for Delphi/C++ Builder 2009 or later) property value is invalid, the return value is false too, corresponding to the OnInvalidLength or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later) event will occur. If there is any invalid character in the Barcode or Data (only for Delphi/C++ Builder 2009 or later) property value, the return value is false too, corresponding to the OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.