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

📄 usetplace.pas

📁 对初学票据套打开发的人很有帮助
💻 PAS
字号:
unit Usetplace;
interface
uses
  Qrctrls, QuickRpt, inifiles, ExtCtrls;
function setplace(left, top: integer; rep: TQuickRep): boolean;
implementation

function setplace(left, top: integer; rep: TQuickRep): boolean;
var
  readini: Tinifile;
  i, j: integer;
  Fleft, Ftop: integer;
begin
   for i := 0 to rep.ControlCount - 1 do
  begin
    ////////////
    if rep.Controls[i] is TQRBand then
    begin
      for j := 0 to (rep.Controls[i] as TQRBand).ControlCount - 1 do
        if (rep.Controls[i] as TQRBand).Controls[j] is TObject then
        begin
          ((rep.Controls[i] as TQRBand).Controls[j] as TObject).Left := ((rep.Controls[i] as TQRBand).Controls[j] as TObject).Left + left;
          ((rep.Controls[i] as TQRBand).Controls[j] as TObject).top := ((rep.Controls[i] as TQRBand).Controls[j] as TObject).top + top;
        end;
    end
    else
      if rep.Controls[i] is TQRChildBand then
      begin
        for j := 0 to (rep.Controls[i] as TQRChildBand).ControlCount - 1 do
        begin
          ((rep.Controls[i] as TQRChildBand).Controls[j] as TObject).Left := ((rep.Controls[i] as TQRChildBand).Controls[j] as TObject).Left + left;
          ((rep.Controls[i] as TQRChildBand).Controls[j] as TObject).top := ((rep.Controls[i] as TQRChildBand).Controls[j] as TObject).top + top;
        end;
      end
      else
        if rep.Controls[i] is TQRsubdetail then
        begin
          for j := 0 to (rep.Controls[i] as TQRsubdetail).ControlCount - 1 do
          begin
            ((rep.Controls[i] as TQRsubdetail).Controls[j] as TObject).Left := ((rep.Controls[i] as TQRsubdetail).Controls[j] as TObject).Left + left;
            ((rep.Controls[i] as TQRsubdetail).Controls[j] as TObject).top := ((rep.Controls[i] as TQRsubdetail).Controls[j] as TObject).top + top;
          end;
        end
        else
          if rep.Controls[i] is TQRStringsBand then
          begin
            for j := 0 to (rep.Controls[i] as TQRStringsBand).ControlCount - 1 do
            begin
              ((rep.Controls[i] as TQRStringsBand).Controls[j] as TObject).Left := ((rep.Controls[i] as TQRStringsBand).Controls[j] as TObject).Left + left;
              ((rep.Controls[i] as TQRStringsBand).Controls[j] as TObject).top := ((rep.Controls[i] as TQRStringsBand).Controls[j] as TObject).top + top;
            end;
          end
          else
          begin
            (rep.Controls[i] as TObject).Left := (rep.Controls[i] as TObject).Left + left;
            (rep.Controls[i] as TObject).top := (rep.Controls[i] as TObject).top + top;
          end;
  end;
end;
end.

⌨️ 快捷键说明

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