IMSL C# Programmers Guide
|
Actions >> Printing |
Printing
Printing from FrameChart
The FrameChart
class, used to build most of the examples in this manual,
includes a print option under the file menu. This option prints the chart as large as
possible, without distortion, and centered on the page.
Printable Interface
Class Chart
implements the .NET PrintPage
interface, which is used to print
a single page. It is implemented by the class Chart
. The following code fragment
shows how to print a chart using its PrinterDocument
class and its PrinterPage
event.
public void Print() { PrintDocument printJob = new PrintDocument(); printJob.PrintPage += new PrintPageEventHandler(Chart.PrintGraphics); PrintDialog printDialog = new PrintDialog(); if (printDialog.ShowDialog() == DialogResult.OK) { printJob.Print() } }
© Visual Numerics, Inc. All rights reserved. |