Ignore:
Timestamp:
Jul 6, 2008, 8:20:14 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Uploading from OR_30_258

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/foia-cprs/CPRS-Chart/Templates/fTemplateDialog.pas

    r459 r460  
    1010  TfrmTemplateDialog = class(TForm)
    1111    sbMain: TScrollBox;
    12     pnlBottom: TPanel;
     12    pnlBottom: TScrollBox;
    1313    btnCancel: TButton;
    1414    btnOK: TButton;
     
    4242    FCheck4Required: boolean;
    4343    FSilent: boolean;
     44    procedure SizeFormToCancelBtn();
    4445    procedure ChkAll(Chk: boolean);
    4546    procedure BuildCB(CBidx: integer; var Y: integer; FirstTime: boolean);
     
    7172implementation
    7273
    73 uses dShared, uConst, uTemplateFields, fRptBox, uInit;
     74uses dShared, uConst, uTemplateFields, fRptBox, uInit, rMisc;
    7475
    7576{$R *.DFM}
     
    391392procedure TfrmTemplateDialog.BuildCB(CBidx: integer; var Y: integer; FirstTime: boolean);
    392393var
    393   bGap, Indent, i, idx, idx2, p1, p2: integer;
    394   EID, ID, PID, DlgProps, tmp, txt, tmpID, ObjID: string;
     394  bGap, Indent, i, idx, p1, p2: integer;
     395  EID, ID, PID, DlgProps, tmp, txt, tmpID: string;
    395396  pctrl, ctrl: TControl;
    396397  pnl: TPanel;
     
    637638  ResizeAnchoredFormToFont(Self);
    638639  FMaxPnlWidth := FontWidthPixel(sbMain.Font.Handle) * MAX_ENTRY_WIDTH; //AGP change Template Dialog to wrap at 80 instead of 74
     640  SetFormPosition(Self);
     641  SizeFormToCancelBtn();
    639642end;
    640643
     
    738741begin
    739742  Application.OnShowHint := FOldHintEvent;
     743  SaveUserBounds(Self);
     744end;
     745
     746procedure TfrmTemplateDialog.SizeFormToCancelBtn;
     747const
     748  RIGHT_MARGIN = 12;
     749var
     750  minWidth : integer;
     751begin
     752  minWidth := btnCancel.Left + btnCancel.Width + RIGHT_MARGIN;
     753  if minWidth > Self.Width then
     754    Self.Width := minWidth;
    740755end;
    741756
Note: See TracChangeset for help on using the changeset viewer.