Procedure

TfrmReminderTree.SetFontSize

Module

fReminderTree

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public

Owner

TfrmReminderTree

Declaration

procedure SetFontSize( NewFontSize: integer);

Calls Hierarchy


TfrmReminderTree.SetFontSize
 ├TfrmReminderTree.SetRemHeaderSectionWidth
 └TfrmReminderTree.pnlTopResize
   └TfrmReminderTree.SetRemHeaderSectionWidth

Called-By Hierarchy


       TfrmReminderTree.SetFontSize
             TfrmFrame.ChangeFont┤ 
     TfrmFrame.LoadSizesForUser┤ │ 
TfrmFrame.LoadUserPreferences┘ │ │ 
       TfrmFrame.UMInitiate┘   │ │ 
     TfrmFrame.mnuFontSizeClick┘ │ 
      TfrmReminderTree.FormCreate┘ 

Calls

Name Declaration Comments
TfrmReminderTree.pnlTopResize procedure pnlTopResize(Sender: TObject); -
TfrmReminderTree.SetRemHeaderSectionWidth procedure SetRemHeaderSectionWidth( SectionIndex: integer; NewWidth: integer); -

Called-By

Name Declaration Comments
TfrmFrame.ChangeFont procedure ChangeFont(NewFontSize: Integer); -
TfrmReminderTree.FormCreate procedure FormCreate(Sender: TObject); -


Source

690   procedure TfrmReminderTree.SetFontSize(NewFontSize: integer);
691   var
692     TotalWidth: integer;
693   begin
694     DateColWidth := ResizeWidth(Font, MainFont, UnscaledDateColWidth);
695     LastDateColWidth := ResizeWidth(Font, MainFont, UnscaledLastDateColWidth);
696     PriorityColWidth := ResizeWidth(Font, MainFont, UnscaledPriorityColWidth);
697     ResizeAnchoredFormToFont(self);
698     TotalWidth := hcRem.Width;
699     SetRemHeaderSectionWidth( 0, TotalWidth - DateColWidth - LastDateColWidth - PriorityColWidth);
700     SetRemHeaderSectionWidth( 1, DateColWidth);
701     SetRemHeaderSectionWidth( 2, LastDateColWidth);
702     SetRemHeaderSectionWidth( 3, PriorityColWidth);
703   
704     lbRem.ItemHeight := ((Abs(Font.Height)+ 6) div 2)*2; //tvRem.ItemHeight;
705     //This is called "best guess calibration"
706     if Font.Size > 12 then lbRem.ItemHeight := lbRem.ItemHeight + 2;
707     //I am reluctant to use an alignment on the tvRem as there si lots of resizing
708     //tricks going on with the scroll bar at the bottom.
709     tvRem.Top := hcRem.Top+hcRem.Height;
710     pnlTopResize(self);
711   end;