Overview
TeeTree includes comprehensive printing support with multi-page capability, print preview, page borders, and full printer integration. TheTTreePage class manages page layout and dimensions.
Printing features are built into the core TeeTree.pas unit. The TreeEd.pas editor provides a complete print preview implementation.
Quick Start
Simple Printing
Print the tree directly to the default printer:Print Preview
Show preview dialog before printing:Page Configuration
- Page Size
- Page Borders
- Current Page
Configure page dimensions:From TeeTree.pas, the
TTreePage class:Multi-Page Trees
1
Enable Page Support
Configure tree for multi-page layout:
2
Calculate Page Bounds
The tree automatically calculates pages:
3
Print All Pages
Print entire multi-page tree:
Printer Settings
Accessing Printer Properties
Print with Custom Settings
Page Navigator
The editor includes a page navigation control: From TreeEd.pas (line 1071):Custom Page Size
Setting Exact Dimensions
Print Quality Settings
From TreeEd.pas TabSheet1 (Print settings):Scrollbars and Page Size
From TeeTree.pas, scrollbars use page size:Events During Printing
Detecting Print Mode
Check if tree is currently printing:Print Dialog Integration
- Standard Print Dialog
- Page Setup Dialog
- Print with Progress
Advanced: Custom Print Rendering
Override the default print behavior:Printing Best Practices
Test Print Preview
Always use print preview before printing to avoid wasted paper.
Page Borders
Show page borders during design to visualize print layout.
Landscape for Wide Trees
Use landscape orientation for horizontally-oriented trees.
UsePrinter = True
Let the printer define page size for best results.
Export as Alternative
For sharing without printing, consider export formats:See the Import/Export guide for saving trees to PDF, images, and other formats.
Print Settings in Editor
From TreeEd.pas TabSheet1 settings:- Printer Default - Use printer page size (UsePrinter)
- Page Width/Height - Custom page dimensions in pixels
- Print Page Border - Include page borders in printout
- Print Panel - Include panel background color
