⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editpageunit.pas

📁 一个报表控件TRepoEdit
💻 PAS
字号:
{*********************************************}
{*   RepoEdit -  QuickReport Editor          *}
{*   for Delphi 4                            *}
{*   (R) Copyright                           *}
{*   Borzov Vladimir borzov@rsm.ru           *}
{*********************************************}
unit EditPageUnit;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  QuickRPT,QRCTRLS,QRPRNTR,
  printers, StdCtrls, Buttons, ExtCtrls, Spin;

type
  TEditPageForm = class(TForm)
    Bevel1: TBevel;
    Label1: TLabel;
    EditTop: TSpinEdit;
    EditLeft: TSpinEdit;
    EditRight: TSpinEdit;
    EditBottom: TSpinEdit;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    EditColumns: TSpinEdit;
    Label7: TLabel;
    EditColumnSpace: TSpinEdit;
    EditPaperSize: TComboBox;
    Label8: TLabel;
    Bevel2: TBevel;
    Label9: TLabel;
    EditLength: TSpinEdit;
    Label10: TLabel;
    EditWidth: TSpinEdit;
    EditRuler: TCheckBox;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    EditOrientation: TComboBox;
    EditUnits: TComboBox;
    Label11: TLabel;
    Bevel3: TBevel;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    ThPage:TQRpage;
  end;

var
  EditPageForm: TEditPageForm;

implementation

{$R *.DFM}



procedure TEditPageForm.BitBtn1Click(Sender: TObject);
begin
    ThPage.TopMargin:=EditTop.Value;
    ThPage.LeftMargin:=EditLeft.Value;
    ThPage.RightMargin:=EditRight.Value;
    ThPage.BottomMargin:=EditBottom.Value;
    ThPage.Columns:=round(EditColumns.Value);
    ThPage.ColumnSpace:=EditColumnSpace.Value;
    ThPage.PaperSize:=TQRPaperSize(EditPaperSize.ItemIndex);
    ThPage.Length:=EditLength.Value;
    ThPage.Width:=EditWidth.Value;
    Thpage.Ruler:=EditRuler.Checked;
    ThPage.Orientation:=TPrinterOrientation(EditOrientation.ItemIndex);
    ThPage.ParentReport.Units:=TQRUnit(EditUnits.ItemIndex);
end;

procedure TEditPageForm.FormShow(Sender: TObject);
begin
    EditTop.Value:=round(ThPage.TopMargin);
    EditLeft.Value:=round(ThPage.LeftMargin);
    EditRight.Value:=round(ThPage.RightMargin);
    EditBottom.Value:=round(ThPage.BottomMargin);
    EditColumns.Value:=ThPage.Columns;
    EditColumnSpace.Value:=round(ThPage.ColumnSpace);
    EditPaperSize.ItemIndex:=ORD(ThPage.PaperSize);
    EditLength.Value:=round(ThPage.Length) ;
    EditWidth.Value:=round(ThPage.Width);
    EditRuler.Checked:=Thpage.Ruler;
    EditOrientation.itemIndex:=ORD(ThPage.Orientation);
    EditUnits.ItemIndex:=ord(ThPage.ParentReport.Units);
end;


end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -