Function

TfrmTemplateEditor.ChangeTree

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Protected

Owner

TfrmTemplateEditor

Declaration

function ChangeTree(NewTree: TTreeView): boolean;

Called-By Hierarchy


                     TfrmTemplateEditor.ChangeTree
                 TfrmTemplateEditor.tvTreeChange┤ 
              TfrmTemplateEditor.cbActiveClick┤ │ 
                TfrmTemplateEditor.tvTreeEnter┤ │ 
              TfrmTemplateEditor.cbShHideClick┤ │ 
            TfrmTemplateEditor.cbActiveClick┘ │ │ 
             TfrmTemplateEditor.cbPerHideClick┤ │ 
            TfrmTemplateEditor.cbActiveClick┘ │ │ 
              TfrmTemplateEditor.sbDeleteClick┤ │ 
       TfrmTemplateEditor.mnuNodeDeleteClick┤ │ │ 
            TfrmTemplateEditor.tvTreeKeyDown┘ │ │ 
                     TfrmTemplateEditor.Resync┤ │ 
              TfrmTemplateEditor.btnNewClick┤ │ │ 
                             EditTemplates┤ │ │ │ 
     TfrmDCSumm.popSummMemoTemplateClick┤ │ │ │ │ 
          TfrmDCSumm.mnuNewTemplateClick┤ │ │ │ │ 
        TfrmDCSumm.mnuEditTemplatesClick┤ │ │ │ │ 
  TfrmDCSumm.mnuEditSharedTemplatesClick┤ │ │ │ │ 
    TfrmDCSumm.mnuNewSharedTemplateClick┤ │ │ │ │ 
   TfrmConsults.popNoteMemoTemplateClick┤ │ │ │ │ 
      TfrmConsults.mnuEditTemplatesClick┤ │ │ │ │ 
        TfrmConsults.mnuNewTemplateClick┤ │ │ │ │ 
TfrmConsults.mnuEditSharedTemplatesClick┤ │ │ │ │ 
  TfrmConsults.mnuNewSharedTemplateClick┤ │ │ │ │ 
       TfrmDrawers.mnuEditTemplatesClick┤ │ │ │ │ 
         TfrmDrawers.mnuNewTemplateClick┤ │ │ │ │ 
    TfrmSurgery.popNoteMemoTemplateClick┤ │ │ │ │ 
       TfrmSurgery.mnuEditTemplatesClick┤ │ │ │ │ 
         TfrmSurgery.mnuNewTemplateClick┤ │ │ │ │ 
 TfrmSurgery.mnuEditSharedTemplatesClick┤ │ │ │ │ 
   TfrmSurgery.mnuNewSharedTemplateClick┤ │ │ │ │ 
      TfrmNotes.popNoteMemoTemplateClick┤ │ │ │ │ 
         TfrmNotes.mnuEditTemplatesClick┤ │ │ │ │ 
           TfrmNotes.mnuNewTemplateClick┤ │ │ │ │ 
   TfrmNotes.mnuEditSharedTemplatesClick┤ │ │ │ │ 
     TfrmNotes.mnuNewSharedTemplateClick┘ │ │ │ │ 
        TfrmTemplateEditor.mnuAutoGenClick┤ │ │ │ 
 TfrmTemplateEditor.mnuImportTemplateClick┘ │ │ │ 
            TfrmTemplateEditor.sbMoveUpClick┤ │ │ 
          TfrmTemplateEditor.sbMoveDownClick┤ │ │ 
         TfrmTemplateEditor.sbDeleteClick...┤ │ │ 
           TfrmTemplateEditor.tvTreeDragDrop┤ │ │ 
        TfrmTemplateEditor.sbCopyLeftClick┤ │ │ │ 
       TfrmTemplateEditor.sbCopyRightClick┤ │ │ │ 
      TfrmTemplateEditor.mnuNodePasteClick┘ │ │ │ 
             TfrmTemplateEditor.mnuSortClick┤ │ │ 
           TfrmTemplateEditor.TemplateLocked┘ │ │ 
             TfrmTemplateEditor.FormCreate┘   │ │ 
              TfrmTemplateEditor.SharedEditing┤ │ 
               TfrmTemplateEditor.FormCreate┤ │ │ 
        TfrmTemplateEditor.cbEditSharedClick┘ │ │ 
              TfrmTemplateEditor.cbxTypeChange┘ │ 
                  TfrmTemplateEditor.tvTreeEnter┘ 

Called-By

Name Declaration Comments
TfrmTemplateEditor.tvTreeChange procedure tvTreeChange(Sender: TObject; Node: TTreeNode); -
TfrmTemplateEditor.tvTreeEnter procedure tvTreeEnter(Sender: TObject); -


Source

1384  function TfrmTemplateEditor.ChangeTree(NewTree: TTreeView): boolean;
1385  var
1386    i: TTemplateTreeControl;
1387  
1388  begin
1389    Result := FALSE;
1390    tvShared.HideSelection := TRUE;
1391    tvPersonal.HideSelection := TRUE;
1392    if (NewTree <> FCurTree) then
1393    begin
1394      Result := TRUE;
1395      if (assigned(FCurTree)) then
1396      begin
1397        for i := low(TTemplateTreeControl) to high(TTemplateTreeControl) do
1398          FTreeControl[TTemplateTreeType(FCurTree.Tag), i].Enabled := FALSE;
1399      end;
1400      FCurTree := NewTree;
1401    end;
1402    if (assigned(FCurTree)) then
1403    begin
1404      FCurTree.HideSelection := FALSE;
1405      if (FCurTree = tvPersonal) and (Screen.ActiveControl = tvShared) then
1406        tvPersonal.SetFocus
1407      else
1408        if (FCurTree = tvShared) and (Screen.ActiveControl = tvPersonal) then
1409          tvShared.SetFocus;
1410    end;
1411  end;