Procedure

TfrmODGen.PlaceFreeText

Module

fODGen

Last Modified

7/15/2014 3:26:42 PM

Visibility

Private

Owner

TfrmODGen

Declaration

procedure PlaceFreeText(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem; CurrentItemNumber: Integer);

Calls Hierarchy


TfrmODGen.PlaceFreeText
 ├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

Called-By Hierarchy


    TfrmODGen.PlaceFreeText
  TfrmODGen.PlaceControls┘ 
 TfrmODGen.SetDialogIEN┘   
TfrmODGen.SetupDialog┘     

Calls

Name Declaration Comments
TfrmODGen.ControlChange procedure ControlChange(Sender: TObject); -
TfrmODGen.PlaceLabel procedure PlaceLabel(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem); -
TfrmODGen.SetComponentName procedure SetComponentName(Editor: TWinControl; Index: Integer; DialogCtrl: TDialogCtrl); -

Called-By

Name Declaration Comments
TfrmODGen.PlaceControls procedure PlaceControls; -


Source

378   procedure TfrmODGen.PlaceFreeText(DialogCtrl: TDialogCtrl; DialogItem: TDialogItem; CurrentItemNumber: Integer);
379   begin
380     with DialogCtrl do
381     begin
382       Editor := TCaptionEdit.Create(Self);
383       Editor.Parent := sbxMain;
384       Editor.SetBounds(FEditorLeft, FEditorTop,
385                        sbxMain.Width - FEditorLeft - WD_MARGIN - GetSystemMetrics(SM_CXVSCROLL),
386                        HT_FRAME * FCharHt);
387       TEdit(Editor).MaxLength := StrToIntDef(Piece(DialogItem.Domain, ':', 2), 0);
388       SetComponentName(Editor, CurrentItemNumber, DialogCtrl);
389     //  TCaptionEdit(Editor).Name := DialogCtrl.ID + IntToStr(CurrentItemNumber);
390       TEdit(Editor).Text := DialogItem.EDefault;
391       TEdit(Editor).Hint := DialogItem.HelpText;
392       TCaptionEdit(Editor).Caption := DialogItem.Prompt;
393       if Length(DialogItem.HelpText) > 0 then TEdit(Editor).ShowHint := True;
394       TEdit(Editor).OnChange := ControlChange;
395       PlaceLabel(DialogCtrl, DialogItem);
396       FEditorTop := FEditorTop + HT_FRAME + FCharHt + HT_SPACE;
397     end;
398   end;