Procedure

TfrmOrders.lstOrdersMeasureItem

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmOrders

Declaration

procedure lstOrdersMeasureItem(Control: TWinControl; Index: Integer;
  var AHeight: Integer);

Calls Hierarchy


TfrmOrders.lstOrdersMeasureItem
 ├TfrmOrders.RetrieveVisibleOrders
 │ └RetrieveOrderFields
 │   └SetOrderFields
 │     ├TOrder.Clear
 │     ├SeqOfDGroup
 │     │ └LoadDGroupMap
 │     └TopNameOfDGroup
 │       └LoadDGroupMap
 ├TChanges.Exist
 └TfrmOrders.MeasureColumnHeight
   └TfrmOrders.GetOrderText
     ├LoadFlagReason
     ├TfrmOrders.GetStartStopText
     └NameOfStatus

Calls

Name Declaration Comments
TChanges.Exist function Exist(ItemType: Integer; const AnID: string): Boolean; -
TfrmOrders.MeasureColumnHeight function MeasureColumnHeight(AnOrder: TOrder; Index: Integer; Column: integer):integer; -
TfrmOrders.RetrieveVisibleOrders procedure RetrieveVisibleOrders(AnIndex: Integer); -


Source

1325  procedure TfrmOrders.lstOrdersMeasureItem(Control: TWinControl; Index: Integer;
1326    var AHeight: Integer);
1327  var
1328    AnOrder: TOrder;
1329    NewHeight: Integer;
1330  begin
1331    NewHeight := AHeight;
1332    with lstOrders do if Index < Items.Count then
1333    begin
1334      AnOrder := TOrder(uOrderList.Items[Index]);
1335      if AnOrder <> nil then with AnOrder do
1336      begin
1337        if not AnOrder.Retrieved then RetrieveVisibleOrders(Index);
1338        Canvas.Font.Style := [];
1339        if Changes.Exist(CH_ORD, ID) then Canvas.Font.Style := [fsBold];
1340      end;
1341      {measure height of event delayed name}
1342      if hdrOrders.Sections[0].Text = 'Event' then
1343        NewHeight := HigherOf(AHeight, MeasureColumnHeight(AnOrder, Index, 0));
1344      {measure height of order text}
1345      NewHeight := HigherOf(NewHeight, MeasureColumnHeight(AnOrder, Index, 2));
1346      {measure height of start/stop times}
1347      NewHeight := HigherOf(NewHeight, MeasureColumnHeight(AnOrder, Index, 3));
1348      if NewHeight > 255 then NewHeight := 255;  // This is maximum allowed by a Windows
1349      if NewHeight <  13 then NewHeight := 13;
1350    end;
1351    AHeight := NewHeight;
1352  end;