Re: Listbox + Print



uses
Printers;

procedure TForm1.Print1Click(Sender: TObject);
var
I: Integer;
PrintText: TextFile;
begin
with TPrintDialog.Create(Self) do
try
if Execute then
begin
AssignPrn(PrintText);
Rewrite(PrintText);
try
Printer.Canvas.Font := ListBox1.Font;
for I := 0 to ListBox1.Items.Count - 1 do
WriteLn(PrintText, ListBox1.Items[I]);
finally
CloseFile(PrintText);
end;
end;
finally
Free;
end;
end;
.