Procedure

TfrmOrders.RedrawOrderList

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Comments

Redraws the Orders list, compensates for changes in item height by re-adding everything

Visibility

Private

Owner

TfrmOrders

Declaration

procedure RedrawOrderList;

Calls Hierarchy


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

Called-By Hierarchy


               TfrmOrders.RedrawOrderList
                 TfrmOrders.NotifyOrder┤ 
                 TfrmFrame.UMNewOrder┘ │ 
      TfrmOrders.hdrOrdersSectionResize┤ 
    TfrmOrders.mnuOptimizeFieldsClick┘ │ 
             TfrmFrame.WMSysCommand┤   │ 
             TfrmOrders.SetFontSize┤   │ 
             TfrmFrame.ChangeFont┘ │   │ 
     TfrmFrame.LoadSizesForUser┤   │   │ 
TfrmFrame.LoadUserPreferences┘ │   │   │ 
       TfrmFrame.UMInitiate┘   │   │   │ 
     TfrmFrame.mnuFontSizeClick┘   │   │ 
   TfrmOrders.hdrOrdersSectionClick┤   │ 
            TfrmOrders.sptHorzMoved┘   │ 
           TfrmOrders.mnuActChangeClick┤ 
              TfrmOrders.SetFontSize...┘ 

Calls

Name Declaration Comments
TfrmOrders.GetPlainText function GetPlainText(AnOrder: TOrder; index: integer):string; -

Called-By

Name Declaration Comments
TfrmOrders.hdrOrdersSectionResize procedure hdrOrdersSectionResize(HeaderControl: THeaderControl; Section: THeaderSection); -
TfrmOrders.mnuActChangeClick procedure mnuActChangeClick(Sender: TObject); -
TfrmOrders.NotifyOrder procedure NotifyOrder(OrderAction: Integer; AnOrder: TOrder); override; -
TfrmOrders.SetFontSize procedure SetFontSize( FontSize: integer); override; -


Source

707   procedure TfrmOrders.RedrawOrderList;
708   { redraws the Orders list, compensates for changes in item height by re-adding everything }
709   var
710     i, SaveTop: Integer;
711     AnOrder: TOrder;
712   begin
713     with lstOrders do
714     begin
715       RedrawSuspend(Handle);
716       SaveTop := TopIndex;
717       Clear;
718       repaint;
719       for i := 0 to uOrderList.Count - 1 do
720       begin
721         AnOrder := TOrder(uOrderList.Items[i]);
722         if (AnOrder.OrderTime <= 0) then
723             Continue;
724         Items.AddObject(AnOrder.ID, AnOrder);
725         Items[i] := GetPlainText(AnOrder,i);
726       end;
727       TopIndex := SaveTop;
728       RedrawActivate(Handle);
729     end;
730   end;