var
Line: Integer;
PrintText: TextFile; {declares a file variable}
begin
AssignPrn(PrintText); {assigns PrintText to the printer}
Rewrite(PrintText); {creates and opens the output file}
Printer.Canvas.Font := Memo1.Font; {assigns Font settings to the canvas}
for Line := 0 to Listbox1.Items.Count - 1 do
Writeln(PrintText, Listbox1.Items[Line]); {writes the contents of the listbox to the printer object}
CloseFile(PrintText); {Closes the printer variable}
end;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.