如何打印 TChart?
我已经显示了一个 TChart,并且屏幕中有一个 TButton。
当 TButton 被点击时,Windows 打印机对话框将会显示,TChart 将会被打印到所选的打印机上。
我该如何在 Delphi 7 中实现这个功能呢?
谢谢。
这非常容易:
procedure TForm1.Button1Click(Sender: TObject);
begin
with TPrintDialog.Create(nil) do
try
if Execute then
Chart1.Print;
finally
Free;
end;
end;