Procedure

TfrmMeds.mnuOptimizeFieldsClick

Module

fMeds

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmMeds

Declaration

procedure mnuOptimizeFieldsClick(Sender: TObject);

Calls Hierarchy


TfrmMeds.mnuOptimizeFieldsClick
 ├TfrmMeds.hdrMedsNonVASectionResize
 ├TfrmMeds.hdrMedsInSectionResize
 └TfrmMeds.hdrMedsOutSectionResize

Called-By Hierarchy


      TfrmMeds.mnuOptimizeFieldsClick
             TfrmFrame.WMSysCommand┤ 
               TfrmMeds.SetFontSize┤ 
             TfrmFrame.ChangeFont┘ │ 
     TfrmFrame.LoadSizesForUser┤   │ 
TfrmFrame.LoadUserPreferences┘ │   │ 
       TfrmFrame.UMInitiate┘   │   │ 
     TfrmFrame.mnuFontSizeClick┘   │ 
    TfrmMeds.hdrMedsOutSectionClick┤ 
  TfrmMeds.hdrMedsNonVASectionClick┤ 
     TfrmMeds.hdrMedsInSectionClick┘ 

Calls

Name Declaration Comments
TfrmMeds.hdrMedsInSectionResize procedure hdrMedsInSectionResize(HeaderControl: THeaderControl; Section: THeaderSection); -
TfrmMeds.hdrMedsNonVASectionResize procedure hdrMedsNonVASectionResize(HeaderControl: THeaderControl; Section: THeaderSection); -
TfrmMeds.hdrMedsOutSectionResize procedure hdrMedsOutSectionResize(HeaderControl: THeaderControl; Section: THeaderSection); -

Called-By

Name Declaration Comments
TfrmMeds.hdrMedsInSectionClick procedure hdrMedsInSectionClick(HeaderControl: THeaderControl; Section: THeaderSection); -
TfrmMeds.hdrMedsNonVASectionClick procedure hdrMedsNonVASectionClick(HeaderControl: THeaderControl; Section: THeaderSection); -
TfrmMeds.hdrMedsOutSectionClick procedure hdrMedsOutSectionClick(HeaderControl: THeaderControl; Section: THeaderSection); -
TfrmMeds.SetFontSize procedure SetFontSize( FontSize: integer); override; -
TfrmFrame.WMSysCommand procedure WMSysCommand(var Message: TMessage); message WM_SYSCOMMAND; -


Source

2111  procedure TfrmMeds.mnuOptimizeFieldsClick(Sender: TObject);
2112  var
2113    totalSectionsWidth, unit1, unit2, unit8: integer;
2114  begin
2115    totalSectionsWidth := pnlTop.Width - 5;
2116    if totalSectionsWidth < 16 then exit;
2117    unit1 := (totalSectionsWidth div 16) - 1;
2118    unit2 := unit1 * 2;
2119    unit8 := unit1 * 8;
2120  
2121    with hdrMedsNonVA do
2122    begin
2123      Sections[0].Width := unit1;
2124      Sections[1].Width := unit8;
2125      Sections[2].Width := unit2;
2126      Sections[3].Width := unit2;
2127    end;
2128    hdrMedsNonVASectionResize(hdrMedsNonVA, hdrMedsNonVA.Sections[0]);
2129    hdrMedsNonVA.Repaint;
2130  
2131    with hdrMedsIn do
2132    begin
2133      Sections[0].Width := unit1;
2134      Sections[1].Width := unit8;
2135      Sections[2].Width := unit2;
2136      Sections[3].Width := unit2;
2137      Sections[4].Width := unit2;
2138    end;
2139    hdrMedsInSectionResize(hdrMedsIn, hdrMedsIn.Sections[0]);
2140    hdrMedsIn.Repaint;
2141    with hdrMedsOut do
2142    begin
2143      Sections[0].Width := unit1;
2144      Sections[1].Width := unit8;
2145      Sections[2].Width := unit2;
2146      Sections[3].Width := unit2;
2147      Sections[4].Width := unit2;
2148      Sections[5].Width := unit1;
2149    end;
2150    hdrMedsOutSectionResize(hdrMedsOut, hdrMedsOut.Sections[0]);
2151    hdrMedsOut.Repaint;
2152  end;