drawTextAlign

Type: Integer

Availability: Read or write at run time only

The drawTextAlign property of the Printer class contains the alignment used when outputting text on the printer using the drawTextAt and drawTextIn methods.

The settings of the drawTextAlign property are listed in the following table.

Printer Class Constant Value Description
DrawTextAlign_Center 2 The drawTextAt method positions the text so that it is centered horizontally over the specified position. The drawTextIn method positions the text so that it is centered within the specified rectangle.
DrawTextAlign_Left 0 Text is output starting at the specified left position (default).
DrawTextAlign_Right 1 The drawTextAt method positions the text so that it ends at the specified position. The drawTextIn method positions the text so that it ends at the right hand edge of the requested rectangle.

For details about placing output directly on a printer page at any location without the use of frames and drawing rotated text and characters, see "Free-Format Printing", later in this chapter.