Function

SelectParentNodeFromList

Module

fNoteIDParents

Last Modified

7/15/2014 3:26:38 PM

Scope

Interfaced

Declaration

function SelectParentNodeFromList(ATree: TORTreeView): string;

Calls Hierarchy


SelectParentNodeFromList
 ├TfrmBase508Form.Create
 │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ ├UnfocusableControlEnter
 │ └AdjustControls
 │   ├TfrmBase508Form.ModifyUnfocusableControl
 │   └..(rec)..
 └MakeNoteDisplayText

Called-By Hierarchy


                  SelectParentNodeFromList
  TfrmDCSumm.mnuActAttachtoIDParentClick┤ 
TfrmConsults.mnuActAttachtoIDParentClick┤ 
   TfrmNotes.mnuActAttachtoIDParentClick┘ 

Calls

Name Declaration Comments
TfrmBase508Form.Create constructor Create(AOwner: TComponent); override; -
MakeNoteDisplayText function MakeNoteDisplayText(RawText: string): string; -

Called-By

Name Declaration Comments
TfrmDCSumm.mnuActAttachtoIDParentClick procedure mnuActAttachtoIDParentClick(Sender: TObject); -
TfrmConsults.mnuActAttachtoIDParentClick procedure mnuActAttachtoIDParentClick(Sender: TObject); -
TfrmNotes.mnuActAttachtoIDParentClick procedure mnuActAttachtoIDParentClick(Sender: TObject); -


Source

33    function SelectParentNodeFromList(ATree: TORTreeView): string;
34    var
35      frmNoteIDParents: TfrmNoteIDParents;
36      i, AnImg: integer;
37      x: string;
38      tmpList: TStringList;
39    begin
40      frmNoteIDParents := TfrmNoteIDParents.Create(Application);
41      tmpList := TStringList.Create;
42      try
43        ResizeFormToFont(TForm(frmNoteIDParents));
44        for i := 0 to ATree.Items.Count - 1 do
45          begin
46            AnImg := TORTreeNode(ATree.Items.Item[i]).ImageIndex;
47            if AnImg in [IMG_SINGLE, IMG_PARENT,IMG_IDNOTE_SHUT, IMG_IDNOTE_OPEN,
48                             IMG_IDPAR_ADDENDA_SHUT, IMG_IDPAR_ADDENDA_OPEN] then
49              begin
50                x := TORTreeNode(ATree.Items.Item[i]).Stringdata;
51                tmpList.Add(Piece(x, U, 1) + U + MakeNoteDisplayText(x) + U + Piece(x, U, 3));
52              end;
53          end;
54        SortByPiece(tmpList, U, 3);
55        InvertStringList(tmpList);
56        FastAssign(tmpList, frmNoteIDParents.lstIDParents.Items);
57        frmNoteIDParents.ShowModal;
58        Result := frmNoteIDParents.FParentNode;
59      finally
60        tmpList.Free;
61        frmNoteIDParents.Release;
62      end;
63    end;