Specifies the distance between the beginning and end of a barcode symbol in pixels.
property BarcodeWidth: Integer;
Specifies the distance between the beginning and end of a barcode symbol in pixels. See diagram:
For TBarcode1D_UPCA, TBarcode1D_UPCE, TBarcode1D_UPCE0, TBarcode1D_UPCE1, TBarcode1D_EAN2, TBarcode1D_EAN5, TBarcode1D_EAN8, and TBarcode1D_EAN13 barcode components, if the TextAlignment property is set to "taCustom", the width of quiet zone marks and their horizontal spacing (LeftQuietZoneSpacing and RightQuietZoneSpacing) are included. See diagram:
For TBarcode1D_ITF6, TBarcode1D_ITF14, and TBarcode1D_ITF16 barcode components, the width of the left and right bearer bars (BearerWidth), the left spacing, and the right spacing are included. See diagram:
If the human readable text is displayed, and it exceeds the barcode symbol in horizontal direction, the excess is included. See diagram:
The property is set using the following formula:
When the property Stretch is set to false:
The BarcodeWidth property will be ignored, the optimization width will be used instead, it's calculated based on the Module property value.
You can get the optimization width value by using the Size method.
When the property Stretch is set to true:
If the property value is equal to zero:
When the Orientation property is set to "boLeftRight" or "boRightLeft", the LeftMargin property value will be subtracted from the width of the TImage, TQRImage, or TQRGzImage control that's specified by Image property, then the result will be used as the final barcode width, the barcode symbol will be reduced/stretched to fit this final width value.
When the Orientation property is set to "boTopBottom" or "boBottomTop", the TopMargin property value will be subtracted from the height of the TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be used as the final barcode width, the barcode symbol will be reduced/stretched to fit this final width value.
If the property value is greater than zero:
The barcode symbol will be reduced/stretched to fit this width value.
If the property value is less than zero:
When the Orientation property is set to "boLeftRight" or "boRightLeft", the LeftMargin property value and the absolute value of the negative width will be subtracted from the width of the TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be used as the final barcode width, the barcode symbol will be reduced/stretched to fit this final width value (it specifies the right margin of the barcode symbol, -1 denotes the right margin is 1, -2 denotes the right margin is 2, ...).
When the Orientation property is set to "boTopBottom" or "boBottomTop", the TopMargin property value and the absolute value of the negative width will be subtracted from the height of the TImage, TQRImage, or TQRGzImage control that's specified by the Image property, then the result will be used as the final barcode width, the barcode symbol will be reduced/stretched to fit this final width value (it specifies the bottom margin of the barcode symbol, -1 denotes the bottom margin is 1, -2 denotes the bottom margin is 2, ...).