>>>>>>>>如何在dbgrideh中设置页码!(100分)

  • 主题发起人 主题发起人 myyzg
  • 开始时间 开始时间
M

myyzg

Unregistered / Unconfirmed
GUEST, unregistred user!
dbgrideh是一个好东西,但在设置页码上好象没着.
 
dbgrigeh是什么东西?
 
是指打印吗?
PrintDBGridEh.PageFooter.CenterText设为 '&[Page]'
 
begin
PrinterPreview.begin
Doc;
i := 1;
PrinterPreview.Canvas.Font.Name := 'Arial';
PrinterPreview.Canvas.Font.Size := 20;
PrinterPreview.Canvas.TextOut(100,100,'Page ' + IntToStr(i));
for i := 2 to 10do
begin
PrinterPreview.NewPage;
PrinterPreview.Canvas.Font.Name := 'Arial';
PrinterPreview.Canvas.Font.Size := 20;
// Lets user to cancel print by pressing stop button in preview form
Application.ProcessMessages;
PrinterPreview.Canvas.TextOut(100,100,'Page ' + IntToStr(i));//显示页码
// Check that user pressed stop button in preview form
if PrinterPreview.Aborted then
Exit;
end;
PrinterPreview.EndDoc;
end
 
接受答案!
 
后退
顶部