|
Introduction
This page does not include details of earlier enhancements/bug
fixes, only those made in version 2-12. If you are not familiar
with the earlier enhancements, check out the Test Project examples.
Updated in 2.12.8
- Bug fixes: Range of minor bug fixes including changing printing
preferences when the ShowPrintingProgress parameter is True in
PrintDoc.
- Added new example: Printing Line Numbers to Test Project
Updated in 2.12.4
- Bug fix: Removed 'Set frmToPrint = Nothing' in FormPrint
and FormDocument that could destroy the form being passed to
the routine.
- Added PrintInvisibleItems parameter to FormPrint
and FormDocument routines. When set to False, controls on forms
that are not visible - or who's parent container is not visible,
are not printed.
New Routines
FormDocument
Member of: qcPrinter
Creates at document from a Form or a container on
the Form. Unlike the FormPrint routine, the FormDocument routine
adds standard text-flow items. This allows for larger forms to
be added or for a form to be added at any point in the Document.
Where the content of the FormDocument items break a page, the content
is continued on the next page. The routine assess the Form layout as a grid and
tries to align each Control on the form based on its original position.
See the FormDocument example in the TestProject.
Syntax
qPrint.FormDocument(ByRef frmToPrint As Object,
_
ByRef UniqueFormKey As String, _
Optional ParentContain As Object = Nothing, _
Optional FormAlign As qePrinterAlign = eJustify, _
Optional ShowTextBorders As Boolean = False, _
Optional UseControlBackgroundColor As Boolean = False, _
Optional ExcludeList As String = "", _
Optional PrintInvisibleItems As Boolean = True)
frmToPrint is the Form.
UniqueFormKey is a key prefix that will be added as a key to the
beginning of each control's corresponding document item. If you
want to add a form multiple times, this value should be changed
each time to keep the Keys unique.
ParentContain is the optional container on the
Form to be printed. Any item outside the Container will not be
included.
FormAlign is the position of the form on the
page. The default value (eJustify) will stretch/shrink the content
of the Form to fit the width of the page. Where a Form is wider
than the page, eJustify will replace any value passed to the
routine.
ShowTextBorders is used to indicate whether a border is displayed
around Textboxes, ComboBoxes etc.
UseControlBackgroundColor is used to indicate whether the routine
should use the Control's background color. If the color is the
same as the parent container or form, a white background is used.
ExcludeList is a string that can list the names
of any controls in the Form/Container that should be excluded from
the Document. Each item should be prefixed by an asterisk * e.g.
"*label1*text1"
PrintInvisibleItems can be used to include controls with visible
property set to false from being printed. This will also affect controls
where their parent container's visibility is set to False.
AdjustHorizontal
Member of: qcDocument
Adjusts the widths and Fontsize of a document. This
is useful when a Document has been created in one Orientation and
the user wants to Print/Preview it in another, or where the size
of the Paper is changed.
Syntax
qPrint.Document.AdjustHorizontal(ByVal
OriginalWidth As Single, Optional ByVal ScaleFonts As Boolean
= False)
OriginalWidth is the Original Width
the document was created in.
ScaleFonts is an optional value that indicates whether
the Fonts should be scaled by the same ratio.
LineJustifyAdjustFontSize
Member of: qcFormatBlock
Used to adjust the font size of a FormatBlock where
the content has been formatted using Carriage Returns/Line Feeds.
The routine finds the widest line and adjusts the font size of
the block so that all the lines fit based on their line breaks.
This is useful for adding fixed font text files.
ShowSaveButton
Member of: qcPrinter
Syntax
qPrint.ShowSaveButton = True/False
Value determines whether a Save button is show on
the Print/Preview screen.
|