Procedure

TfrmOrders.mnuOptimizeFieldsClick

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmOrders

Declaration

procedure mnuOptimizeFieldsClick(Sender: TObject);

Calls Hierarchy


TfrmOrders.mnuOptimizeFieldsClick
 └TfrmOrders.hdrOrdersSectionResize
   └TfrmOrders.RedrawOrderList
     └TfrmOrders.GetPlainText
       └TfrmOrders.GetOrderText
         ├LoadFlagReason
         ├TfrmOrders.GetStartStopText
         └NameOfStatus

Called-By Hierarchy


    TfrmOrders.mnuOptimizeFieldsClick
             TfrmFrame.WMSysCommand┤ 
             TfrmOrders.SetFontSize┤ 
             TfrmFrame.ChangeFont┘ │ 
     TfrmFrame.LoadSizesForUser┤   │ 
TfrmFrame.LoadUserPreferences┘ │   │ 
       TfrmFrame.UMInitiate┘   │   │ 
     TfrmFrame.mnuFontSizeClick┘   │ 
   TfrmOrders.hdrOrdersSectionClick┤ 
            TfrmOrders.sptHorzMoved┘ 

Calls

Name Declaration Comments
TfrmOrders.hdrOrdersSectionResize procedure hdrOrdersSectionResize(HeaderControl: THeaderControl; Section: THeaderSection); -

Called-By

Name Declaration Comments
TfrmOrders.hdrOrdersSectionClick procedure hdrOrdersSectionClick(HeaderControl: THeaderControl; Section: THeaderSection); -
TfrmOrders.SetFontSize procedure SetFontSize( FontSize: integer); override; -
TfrmOrders.sptHorzMoved procedure sptHorzMoved(Sender: TObject); -
TfrmFrame.WMSysCommand procedure WMSysCommand(var Message: TMessage); message WM_SYSCOMMAND; -


Source

3443  procedure TfrmOrders.mnuOptimizeFieldsClick(Sender: TObject);
3444  var
3445    totalSectionsWidth, unitvalue: integer;
3446  begin
3447    totalSectionsWidth := pnlRight.Width - 3;
3448    if totalSectionsWidth < 16 then exit;
3449    unitvalue := round(totalSectionsWidth / 16);
3450    with hdrOrders do
3451    begin
3452      Sections[1].Width := unitvalue;
3453      Sections[2].Width := pnlRight.Width - (unitvalue * 10) - 5;
3454      Sections[3].Width := unitvalue * 2;
3455      Sections[4].Width := unitvalue * 2;
3456      Sections[5].Width := unitvalue;
3457      Sections[6].Width := unitvalue;
3458      Sections[7].Width := unitvalue;
3459      Sections[8].Width := unitvalue;
3460      Sections[9].Width := unitvalue;
3461    end;
3462    hdrOrdersSectionResize(hdrOrders, hdrOrders.Sections[0]);
3463    hdrOrders.Repaint;
3464  end;