Barcode.TextPosition

Barcode

RectangleF TECIT.TBarCode.Barcode.TextPosition { get; set; }

Gets or sets the position of the currently active text object.

The text position is specified by a bounding rectangle. The coordinates of this rectangle are relative to the bar code's bounding rectangle.

EXAMPLE:

// reserve space by adding a quiet zone
barcode.QuietZones.Bottom.Size = textHeight;
barcode.QuietZones.Unit = QuietZoneUnit.Pixel; // Pixel for bitmap

// select text object 1
barcode.ActiveTextIndex = 1;

// set text position inside of quiet zone
barcode.TextPosition = new RectangleF(0, barcode.BoundingRectangleF.Height - textHeight),
                                      barcode.BoundingRectangleF.Width, textHeight);

barcode.HumanReadableText = "ABCDEFG";
barcode.TextAlignment = Alignment.Center;
barcode.IsTextVisible = true;
barcode.FontName = "Arial";
barcode.FontHeight = 12;

Works only if the currently active text is NOT the human readable text (with index 0) but one of the extra text objects.

The currently active text object can be selected by calling ActiveTextIndex.

The text alignment.

Search documentation

Search in
More scopes
Additional scopes

All contents