Frequently Asked Component Specific Questions
Options |
|
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>

TMS VCL ChartPrinting
The support for printing in TAdvChartView is on level of panes. The chart can print a single pane or can print all panes at once. As the print function just sends the chart to a destination Canvas, the print function can be used to send the chart to a printer device but it can be used to send the output also to a memory bitmap canvas:
Print on a printer
if PrinterSetupDialog1.Execute then
begin
with printer do
begin
BeginDoc;
//The rectangle to print the AdvChartView.
r := Rect(0, 0, printer.PageWidth, printer.PageHeight);
AdvChartView.PrintAllPanes(Printer.Canvas, r);
//OR print a single pane.
AdvChartView.PrintPane(0, Printer.Canvas, r);
EndDoc;
end;
end;if SavePictureDialog1.Execute then begin //for example the size of the picture has been set to a 1280 x 1024 //resolution. AdvChartView1.SaveAllPanesToBitmap(SavePictureDialog1.FileName ,1280, 1024); end;
