Procedure

TfrmProblems.mnuOptimizeFieldsClick

Module

fProbs

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmProblems

Declaration

procedure mnuOptimizeFieldsClick(Sender: TObject);

Calls Hierarchy


TfrmProblems.mnuOptimizeFieldsClick
 └TfrmProblems.HeaderControlSectionResize

Called-By Hierarchy


      TfrmProblems.mnuOptimizeFieldsClick
                 TfrmFrame.WMSysCommand┤ 
              TfrmProblems.lstViewClick┤ 
      TfrmProblems.HighlightDuplicate┘ │ 
            TfrmProblems.AddProblem┤   │ 
    TfrmProblems.lstProbActsClick┤ │   │ 
TfrmProblems.wgProbDataDblClick┤ │ │   │ 
   TfrmProblems.lstViewClick...┘ │ │   │ 
    TfrmProblems.lstProbPickClick┤ │   │ 
 TfrmProblems.lstProbPickDblClick┤ │   │ 
 TfrmProblems.edProbEntKeyPress┘ │ │   │ 
         TfrmProblems.UMPLLexicon┘ │   │ 
      TfrmdlgProb.bbChangeProbClick┘   │ 
               TfrmProblems.SetFontSize┤ 
                 TfrmFrame.ChangeFont┘ │ 
         TfrmFrame.LoadSizesForUser┤   │ 
    TfrmFrame.LoadUserPreferences┘ │   │ 
           TfrmFrame.UMInitiate┘   │   │ 
         TfrmFrame.mnuFontSizeClick┘   │ 
 TfrmProblems.HeaderControlSectionClick┤ 
              TfrmProblems.sptHorzMoved┘ 

Calls

Name Declaration Comments
TfrmProblems.HeaderControlSectionResize procedure HeaderControlSectionResize(HeaderControl: THeaderControl; Section: THeaderSection); -

Called-By

Name Declaration Comments
TfrmProblems.HeaderControlSectionClick procedure HeaderControlSectionClick(HeaderControl: THeaderControl; Section: THeaderSection); -
TfrmProblems.lstViewClick procedure lstViewClick(Sender: TObject); -
TfrmProblems.SetFontSize procedure SetFontSize( NewFontSize: integer); override; -
TfrmProblems.sptHorzMoved procedure sptHorzMoved(Sender: TObject); -
TfrmFrame.WMSysCommand procedure WMSysCommand(var Message: TMessage); message WM_SYSCOMMAND; -


Source

2075  procedure TfrmProblems.mnuOptimizeFieldsClick(Sender: TObject);
2076  var
2077    totalSectionsWidth, unitvalue: integer;
2078  begin
2079    totalSectionsWidth := pnlRight.Width - 3;
2080    if totalSectionsWidth < 16 then exit;
2081    unitvalue := round(totalSectionsWidth / 16);
2082    with HeaderControl do
2083    begin
2084      if Sections[1].Width > 0 then Sections[1].Width := unitvalue;
2085      Sections[2].Width := pnlRight.Width - (unitvalue * 11) - 5;
2086      Sections[3].Width := unitvalue * 2;
2087      Sections[4].Width := unitvalue * 2;
2088      if Sections[6].Width > 0 then Sections[6].Width := unitvalue;
2089      if Sections[7].Width > 0 then Sections[7].Width := unitvalue * 2;
2090      if Sections[8].Width > 0 then Sections[8].Width := unitvalue * 2;
2091      if Sections[15].Width > 0 then Sections[15].Width := unitvalue;
2092    end;
2093    HeaderControlSectionResize(HeaderControl, HeaderControl.Sections[0]);
2094    HeaderControl.Repaint;
2095  end;