Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing?

Status
Not open for further replies.

sasogr

Programmer
Nov 6, 2003
3
MK
I have a component panel1 consisting of a list of type TListView and few labels. Now I want to print everything on that panel using printdialog. How to do this?
 
Quoted directly from the Delphi 5 help file example for the "Printer" function:

This example uses a button and a memo on a form. When the user clicks the button, the content of the memo is printed, with a 200-pixel border around the page. To run this example successfully, you must add the Printers unit to the uses clause of your unit.

procedure TForm1.Button1Click(Sender: TObject);
begin
with Printer do
begin
BeginDoc;
Canvas.TextRect(Rect(200,200,PageWidth-200,
PageHeight-200),200, 200, Memo1.Lines.Text);
EndDoc;
end;
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top