Procedure

TfrmPtSel.AdjustFormSize

Module

fPtSel

Last Modified

7/15/2014 3:26:38 PM

Comments

Adjusts the initial size of the form based on the font used & if notifications should show.

Visibility

Private

Owner

TfrmPtSel

Declaration

procedure AdjustFormSize(ShowNotif: Boolean; FontSize: Integer);

Calls Hierarchy


TfrmPtSel.AdjustFormSize
 ├SetFormPosition
 │ └TSizeHolder.GetSize
 ├SetUserBounds2
 │ └LoadSizes
 ├TfrmPtSel.AdjustButtonSize
 └TfrmPtSel.AdjustNotificationButtons

Called-By Hierarchy


                       TfrmPtSel.AdjustFormSize
                                SelectPatient┘ 
                 TfrmFrame.mnuFileOpenClick┘   
                     TfrmFrame.UMInitiate┤     
               TfrmFrame.mnuFileNextClick┤     
          TfrmFrame.mnuFileOpenClick...┤ │     
      TfrmFrame.mnuFileNotifRemoveClick┤ │     
              TfrmFrame.NextButtonClick┘ │     
            TfrmFrame.SetUpNextButton┘   │     
      TfrmFrame.mnuFileOpenClick...┤     │     
               TfrmFrame.FormResize┘     │     
             TfrmFrame.ChangeFont┘       │     
     TfrmFrame.LoadSizesForUser┤         │     
TfrmFrame.LoadUserPreferences┘ │         │     
       TfrmFrame.UMInitiate┘   │         │     
     TfrmFrame.mnuFontSizeClick┘         │     
            TfrmFrame.mnuFileRefreshClick┤     
            TfrmOrders.CheckOrderStatus┤ │     
        TfrmOrders.mnuActChgEvntClick┤ │ │     
           TfrmOrders.mnuActHoldClick┤ │ │     
         TfrmOrders.mnuActUnholdClick┤ │ │     
          TfrmOrders.mnuActRenewClick┤ │ │     
         TfrmOrders.mnuActChangeClick┤ │ │     
           TfrmOrders.mnuActCopyClick┘ │ │     
                 TfrmMeds.mnuActDCClick┤ │     
                TfrmMeds.CheckMedStatus┘ │     
             TfrmMeds.mnuActHoldClick┤   │     
            TfrmMeds.mnuActRenewClick┤   │     
           TfrmMeds.mnuActUnholdClick┤   │     
           TfrmMeds.mnuActChangeClick┤   │     
             TfrmMeds.mnuActCopyClick┤   │     
           TfrmMeds.mnuActRefillClick┘   │     
                       TfrmFrame.ViewInfo┘     
                    TfrmDCSumm.ViewInfo┤       
                  TfrmConsults.ViewInfo┤       
          TfrmFrame.pnlRemindersMouseUp┤       
           TfrmFrame.RemindersChanged┘ │       
               TfrmFrame.FormCreate┘   │       
                 TfrmFrame.pnlCIRNClick┤       
           TfrmFrame.pnlVistaWebClick┤ │       
                TfrmFrame.FormKeyDown┘ │       
              TfrmFrame.pnlPatientClick┤       
                TfrmFrame.pnlVisitClick┤       
          TfrmFrame.pnlPrimaryCareClick┤       
            TfrmFrame.pnlRemindersClick┤       
             TfrmFrame.pnlPostingsClick┤       
                 TfrmFrame.pnlFlagClick┤       
                   TfrmFrame.laMHVClick┤       
                  TfrmFrame.laVAA2Click┤       
                    TfrmOrders.ViewInfo┤       
                      TfrmMeds.ViewInfo┤       
                   TfrmSurgery.ViewInfo┤       
                     TfrmNotes.ViewInfo┤       
                  TfrmProblems.ViewInfo┘       

Calls

Name Declaration Comments
TfrmPtSel.AdjustButtonSize procedure AdjustButtonSize(pButton:TButton); -
TfrmPtSel.AdjustNotificationButtons procedure AdjustNotificationButtons; -
SetFormPosition procedure SetFormPosition(AForm: TForm); -
SetUserBounds2 procedure SetUserBounds2(AName: string; var v1, v2, v3, v4: integer); -

Called-By

Name Declaration Comments
SelectPatient procedure SelectPatient(ShowNotif: Boolean; FontSize: Integer; var UserCancelled: boolean); -


Source

177   procedure TfrmPtSel.AdjustFormSize(ShowNotif: Boolean; FontSize: Integer);
178   { Adjusts the initial size of the form based on the font used & if notifications should show. }
179   var
180     Rect: TRect;
181     SplitterTop, t1, t2, t3: integer;
182   begin
183     SetFormPosition(self);
184     ResizeAnchoredFormToFont(self);
185     if ShowNotif then
186     begin
187       pnlDivide.Visible := True;
188       lstvAlerts.Visible := True;
189       pnlNotifications.Visible := True;
190       pnlPtSel.BevelOuter := bvRaised;
191     end
192     else
193     begin
194       pnlDivide.Visible := False;
195       lstvAlerts.Visible := False;
196       pnlNotifications.Visible := False;
197     end;
198     //SetFormPosition(self);
199     Rect := BoundsRect;
200     ForceInsideWorkArea(Rect);
201     BoundsRect := Rect;
202     if frmFrame.EnduringPtSelSplitterPos <> 0 then
203       SplitterTop := frmFrame.EnduringPtSelSplitterPos
204     else
205       SetUserBounds2(Name+'.'+sptVert.Name,SplitterTop, t1, t2, t3);
206     if SplitterTop <> 0 then
207       pnlPtSel.Height := SplitterTop;
208     FNotificationBtnsAdjusted := False;
209     AdjustButtonSize(cmdSaveList);
210     AdjustButtonSize(cmdProcessInfo);
211     AdjustButtonSize(cmdProcessAll);
212     AdjustButtonSize(cmdProcess);
213     AdjustButtonSize(cmdForward);
214     AdjustButtonSize(cmdRemove);
215     AdjustButtonSize(cmdComments);
216     AdjustNotificationButtons;
217   end;