Procedure

TfrmODGen.PlaceControls

Module

fODGen

Last Modified

7/15/2014 3:26:42 PM

Visibility

Private

Owner

TfrmODGen

Declaration

procedure PlaceControls;

Calls Hierarchy


TfrmODGen.PlaceControls
 ├TfrmODGen.PlaceDateTime
 │ ├TfrmODGen.SetComponentName
 │ ├TfrmODGen.ControlChange
 │ │ ├TResponses.Update
 │ │ │ ├TResponses.FindResponseByName
 │ │ │ └TResponses.IENForPrompt
 │ │ └TResponses.GetOrderText
 │ │   ├TResponses.NextInstance
 │ │   ├TResponses.FindResponseByName
 │ │   ├TResponses.FormatResponse
 │ │   │ └TResponses.FindResponseByIEN
 │ │   └TResponses.AppendChildren
 │ │     ├TResponses.FindPromptByIEN
 │ │     ├TResponses.FindResponseByIEN
 │ │     └TResponses.FormatResponse...
 │ └TfrmODGen.PlaceLabel
 ├TfrmODGen.PlaceFreeText
 │ ├TfrmODGen.SetComponentName
 │ ├TfrmODGen.ControlChange...
 │ └TfrmODGen.PlaceLabel
 ├TfrmODGen.PlaceHidden
 ├TfrmODGen.PlaceNumeric
 │ ├TfrmODGen.SetComponentName
 │ ├TfrmODGen.ControlChange...
 │ └TfrmODGen.PlaceLabel
 ├TfrmODGen.PlaceLookup
 │ ├GlobalRefForFile
 │ ├TfrmODGen.SetComponentName
 │ ├GetDefaultTSForEvt
 │ ├GetTSListForEvt
 │ ├TfrmODGen.LookupNeedData
 │ │ └SubsetOfEntries
 │ ├TfrmODGen.ControlChange...
 │ └TfrmODGen.PlaceLabel
 ├TfrmODGen.PlaceSetOfCodes
 │ ├TfrmODGen.SetComponentName
 │ ├TfrmODGen.ControlChange...
 │ └TfrmODGen.PlaceLabel
 ├TfrmODGen.PlaceMemo
 │ ├TfrmODGen.SetComponentName
 │ ├TfrmODGen.ControlChange...
 │ └TfrmODGen.PlaceLabel
 └TfrmODGen.PlaceYesNo
   ├TfrmODGen.SetComponentName
   ├TfrmODGen.ControlChange...
   └TfrmODGen.PlaceLabel

Called-By Hierarchy


  TfrmODGen.PlaceControls
 TfrmODGen.SetDialogIEN┘ 
TfrmODGen.SetupDialog┘   

Calls

Name Declaration Comments
TfrmODGen.PlaceDateTime procedure PlaceDateTime(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem; CurrentItemNumber: Integer); -
TfrmODGen.PlaceFreeText procedure PlaceFreeText(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem; CurrentItemNumber: Integer); -
TfrmODGen.PlaceHidden procedure PlaceHidden(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem); -
TfrmODGen.PlaceLookup procedure PlaceLookup(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem; CurrentItemNumber: Integer); -
TfrmODGen.PlaceMemo procedure PlaceMemo(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem; CurrentItemNumber: Integer); -
TfrmODGen.PlaceNumeric procedure PlaceNumeric(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem; CurrentItemNumber: Integer); -
TfrmODGen.PlaceSetOfCodes procedure PlaceSetOfCodes(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem; CurrentItemNumber: Integer); -
TfrmODGen.PlaceYesNo procedure PlaceYesNo(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem; CurrentItemNumber: Integer); -

Called-By

Name Declaration Comments
TfrmODGen.SetDialogIEN procedure SetDialogIEN(Value: Integer); override; -


Source

309   procedure TfrmODGen.PlaceControls;
310   var
311     i: Integer;
312     DialogItem: TDialogItem;
313     DialogCtrl: TDialogCtrl;
314   begin
315     FCharHt := MainFontHeight;
316     FCharWd := MainFontWidth;
317     FEditorTop := HT_SPACE;
318     FLabelWd := 0;
319     with FDialogItemList do for i := 0 to Count - 1 do with TDialogItem(Items[i]) do
320       if not Hidden then FLabelWd := HigherOf(FLabelWd, Canvas.TextWidth(Prompt));
321     FEditorLeft := FLabelWd + (WD_MARGIN * 2);
322     with FDialogItemList do for i := 0 to Count - 1 do
323     begin
324       DialogItem := TDialogItem(Items[i]);
325       if FilterOut then
326       begin
327         if ( compareText(TsID,DialogItem.Id)=0 ) or ( compareText(TSDomain,DialogItem.Domain)=0) then
328           Continue;
329         if (Pos('primary',LowerCase(DialogItem.Prompt)) > 0) then
330           Continue;
331         if (compareText(AttendID,DialogItem.ID) = 0) or ( compareText(AttendDomain,DialogItem.Domain)=0 ) then
332           Continue;
333       end;
334       DialogCtrl := TDialogCtrl.Create;
335       DialogCtrl.ID       := DialogItem.ID;
336       DialogCtrl.DataType := DialogItem.DataType;
337       DialogCtrl.Required := DialogItem.Required;
338       DialogCtrl.Preserve := Length(DialogItem.EDefault) > 0;
339       case DialogItem.DataType of
340       'D': PlaceDateTime(DialogCtrl, DialogItem, I);
341       'F': PlaceFreeText(DialogCtrl, DialogItem, i);
342       'H': PlaceHidden(DialogCtrl, DialogItem);
343       'N': PlaceNumeric(DialogCtrl, DialogItem, i);
344       'P': PlaceLookup(DialogCtrl, DialogItem, i);
345       'R': PlaceDateTime(DialogCtrl, DialogItem, i);
346       'S': PlaceSetOfCodes(DialogCtrl, DialogItem, i);
347       'W': PlaceMemo(DialogCtrl, DialogItem, i);
348       'Y': PlaceYesNo(DialogCtrl, DialogItem, i);
349       end;
350       FDialogCtrlList.Add(DialogCtrl);
351       if (DialogCtrl.Editor <> nil) and (FFirstCtrl = nil) then FFirstCtrl := DialogCtrl.Editor;
352     end;
353   end;