TextItems are the elements within the qPrinter
object that combine to create a document. TextItems can be
Absolute or TextFlow items. TextFlow items are printed one
after another in the order they are added to the qPrinter
object. Absolute items can be positioned on a specific page at
a specific location. They are always printed behind 'text
flow' items.
| TextItem Properties |
| Abosolute |
[R/W]
Boolean value indicating TextItem is absolutely positioned. |
| AbsPage |
[R/W]
Page number where absolute item should appear. |
| Alignment |
[R/W]
Default alignment for TextItem (Left, Right, Centre, Justify) |
| BorderColor |
[R/W]
Long value indicating the line colour of the border |
| BorderLine |
[R/W]
Integer value for line width. |
| BorderShading |
[R/W]
Long value indicating the background colour for the
text. Set to -1 for transparent. |
| EndPage |
[R]
Integer value indicating the last page a textitem falls on
(non-absolute items). |
| FontBold |
[R/W]
Boolean |
| FontColor |
[R/W]
Text colour |
| FontItalic |
[R/W]
Boolean |
| FontName |
[R/W]
String |
| FontSize |
[R/W]
Single |
| FontUnderline |
[R/W]
Boolean |
| Height |
[R] Single indicating the height of the text
item |
| IndentLeft |
[R/W]
Single value indicating left-hand indentation based on
'scalemode' property |
| IndentRight |
[R/W]
Single value indicating right-hand indentation based on
'scalemode' property |
| Left |
[R/W] Not
implemented |
| LineSpacing |
[R/W]
Single value indicating the additional space to include with
each line. |
| MaxHeight |
[R/W]
Single value indicating the maximum height for an absolutely
positioned item |
| NewPage |
[R/W]
Determines whether a new page is inserted (before, after, both
or none) |
| PositionEnd |
[R] The
end position of the TextItem on the EndPage (non-absolute
items). |
| PositionStart |
[R] The
start position of the TextItem on the StartPage (non-absolute
items). |
| ScaleMode |
[R/W]
Scale mode of individual TextItem (twip, inch, mm, cm,
percentage) |
| ShowBorder |
[R/W]
Boolean determines whether border and shading are shown. |
| StartPage |
[R] The
startpage of the TextItem (non-absolute items) |
| Text |
[R/W]
String |
| Top |
[R/W]
Single indicating the top border of absolutely positioned
TextItems. |
| Width |
[R]
Single indicating the width of a text item. |
| |
|
| TextItem Notes |
| Percentage
ScaleMode |
When
using 'percentage' as the ScaleMode property value any values
will relate to the horizontal or vertical page measurements
depending on the value being set. For example, an
'IndentLeft' value of 10% is related to page width, on A4
21mm. A 'top' value of 10% would be 29.7mm. |
| BorderLine
Property |
The
border line property uses the .DrawWidth property of the
preview PictureBox and the printer. This is a pixel
based setting. |
| Alignment |
TextItems
measurements are calculated when a call is made to the Pages
property of the qPrinter object or a Preview or PrintDoc call
is made. The values of StartPage, EndPage, PositionStart
and PositionEnd will be zero until one of these calls is
made. Any changes to the document will affect the
measurements. |
| |
|
| TextItem internal Style Tags |
| <B> |
Bold |
| <I> |
Italic |
| <U> |
Underline |
| <FONT=n> |
Change
font face where n is a string indicating the name of the font
face |
| <SIZE=n> |
Change
the size of the font (n) |
| <COLOR=n> |
Change
the colour of the text where n is a hexadecimal represented by
#rrggbb |
| <ALIGN=n> |
Change
the Alignment (Left, Centre, Center, Right or Justify).
Only one call can be made per line. If more than one
call is made, the last one will be used. The new
alignment will value will be used for all subsequent lines
until changed or an end tag is encountered. The end tag
will return the alignment to the TextItem default. |
| <LINDENT=n> |
Change
the Left Indentation of the TextItem. This is
independent of the default .IndentLeft value. A forced
same line print will be initiated. Anything that has
already been queued for the line will be printed before the
Indent is implemented. This allows lefthand margin
titles similar to the layout of this page. |
| <RINDENT=n> |
Change
the Right Indentation of the TextItem. See
<LINDENT=n> |
| <FORCE> |
Anything
on the line prior to the FORCE call will be sent to the
printer/preview and the next piece of information will be
printed at the same vertical position. This allows
left/right alignment on the same line e.g.
Edward<FORCE><ALIGN=Right>Moth
would print Edward on the left hand margin and Moth on the
right hand margin. |
| End
Tags |
All style
tags can be closed using </style> e.g.
</B></FONT> there is no requirement for a
closing FORCE tag. |
| |
|