Changeset 830 for cprs/trunk/CPRS-Chart/fMedCopy.pas
- Timestamp:
- Jul 7, 2010, 4:51:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/fMedCopy.pas
r456 r830 6 6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 7 7 StdCtrls, ORDtTm, ORCtrls, ORFn, rOrders, uCore, rCore, mEvntDelay, fAutoSz, 8 ExtCtrls, UConst ;8 ExtCtrls, UConst, fBase508Form, VA508AccessibilityManager; 9 9 10 10 type 11 TfrmMedCopy = class(T Form)12 Panel1: TPanel;13 lblPtInfo: T Label;14 Panel2: TPanel;11 TfrmMedCopy = class(TfrmBase508Form) 12 pnlTop: TPanel; 13 lblPtInfo: TVA508StaticText; 14 pnlInpatient: TPanel; 15 15 lblInstruction: TStaticText; 16 16 Image1: TImage; 17 Label1: TStaticText;18 Panel3: TPanel;19 GroupBox2: TGroupBox;17 lblInstruction2: TStaticText; 18 pnlMiddle: TPanel; 19 gboxMain: TGroupBox; 20 20 radDelayed: TRadioButton; 21 21 radRelease: TRadioButton; 22 22 cmdOK: TButton; 23 23 cmdCancel: TButton; 24 Panel4: TPanel;24 pnlBottom: TPanel; 25 25 fraEvntDelayList: TfraEvntDelayList; 26 26 procedure cmdOKClick(Sender: TObject); … … 39 39 FDelayEvent: TOrderDelayEvent; 40 40 FOKPressed: Boolean; 41 procedure AdjustFormSize; 41 42 public 42 43 { Public declarations } … … 51 52 {$R *.DFM} 52 53 53 uses fODBase, fOrdersTS, fOrders ;54 uses fODBase, fOrdersTS, fOrders, VAUtils; 54 55 55 56 const … … 113 114 end; 114 115 ResizeAnchoredFormToFont(frmMedCopy); 116 frmMedCopy.AdjustFormSize; 115 117 CurrTS := Piece(GetCurrentSpec(Patient.DFN),'^',1); 116 118 if Length(CurrTS)>0 then … … 127 129 frmMedCopy.lblPtInfo.Caption := Patient.Name + ' currently is an outpatient.' + SpeCap; 128 130 end; 131 frmMedCopy.AdjustFormSize; 129 132 frmMedCopy.fraEvntDelayList.EvntLimit := LimitEvent; 130 133 if Pos('transfer',RadCap)>0 then … … 134 137 if LimitEvent='D' then 135 138 begin 136 frmMedCopy. Panel2.Visible := False;137 frmMedCopy. Height := frmMedCopy.Panel1.Height + frmMedCopy.GroupBox2.Height;139 frmMedCopy.pnlInpatient.Visible := False; 140 frmMedCopy.AdjustFormSize; 138 141 end; 139 142 frmMedCopy.ShowModal; … … 223 226 radRelease.Checked := True; 224 227 if not Patient.Inpatient then 225 panel2.Visible := False; 226 if not radDelayed.Checked then 227 begin 228 if not panel2.Visible then 229 Height := Height - fraEvntDelayList.Height - panel2.Height 230 else 231 Height := Height - fraEvntDelayList.Height; 232 end; 228 pnlInpatient.Visible := False; 229 AdjustFormSize; 233 230 end; 234 231 … … 261 258 end; 262 259 260 procedure TfrmMedCopy.AdjustFormSize; 261 var 262 y: integer; 263 begin 264 y := lblPtInfo.Height + 8; // allow for font changes 265 if pnlInpatient.Visible then 266 begin 267 lblInstruction2.top := lblInstruction.Height; // allow for font change 268 pnlInpatient.Height := lblInstruction2.top + lblInstruction2.Height; 269 inc(y,pnlInpatient.Height); 270 end; 271 pnlTop.Height := y; 272 inc(y, pnlMiddle.Height); 273 if fraEvntDelayList.Visible then 274 begin 275 inc(y, fraEvntDelayList.Height); 276 end; 277 VertScrollBar.Range := y; 278 ClientHeight := y; 279 end; 280 263 281 procedure TfrmMedCopy.cmdCancelClick(Sender: TObject); 264 282 begin … … 278 296 if fraEvntDelayList.mlstEvents.Items.Count < 1 then 279 297 begin 280 ShowM essage(WarningMSG);298 ShowMsg(WarningMSG); 281 299 radRelease.Checked := True; 282 300 end else 283 301 begin 284 Height := Height + fraEvntDelayList.Height;285 302 fraEvntDelayList.Visible := True; 286 303 end; 304 AdjustFormSize; 287 305 end; 288 306 … … 291 309 inherited; 292 310 fraEvntDelayList.Visible := False; 293 Height := Height - fraEvntDelayList.Height;311 AdjustFormSize; 294 312 end; 295 313 … … 326 344 Shift: TShiftState); 327 345 begin 346 inherited; 328 347 if Key = VK_RETURN then 329 348 cmdOKClick(Self);
Note:
See TracChangeset
for help on using the changeset viewer.