Procedure

TfrmTemplateEditor.EnableControls

Module

fTemplateEditor

Last Modified

7/15/2014 3:26:44 PM

Visibility

Protected

Owner

TfrmTemplateEditor

Declaration

procedure EnableControls(ok, Root: boolean);

Calls Hierarchy


TfrmTemplateEditor.EnableControls
 ├TfrmTemplateEditor.UpdateInsertsDialogs
 │ ├TfrmTemplateObjects.UpdateStatus
 │ └TfrmTemplateFields.UpdateStatus
 │   └TfrmTemplateFields.ValidInsert
 └TfrmTemplateEditor.EnableNavControls
   └TfrmTemplateEditor.AllowMove
     ├TfrmTemplateEditor.IsTemplateLocked
     │ ├TTemplate.AutoLock
     │ │ └TTemplate.LinkType
     │ ├TTemplate.IsLocked
     │ │ └TTemplate.AutoLock...
     │ └..(rec)..
     └TTemplate.GetItems
       └ExpandTemplate
         ├TTemplate.GetChildren
         ├GetTemplateChildren
         ├AddTemplate
         │ ├TTemplate.Create
         │ │ └TTemplate.ReminderDialogIEN
         │ └TTemplate.AddChild
         │   └TTemplate.GetItems...
         └TTemplate.ItemIENs
           └TTemplate.GetItems...

Called-By Hierarchy


                 TfrmTemplateEditor.EnableControls
                 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┘   

Calls

Name Declaration Comments
TfrmTemplateEditor.EnableNavControls procedure EnableNavControls; -
TfrmTemplateEditor.UpdateInsertsDialogs procedure UpdateInsertsDialogs; -

Called-By

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


Source

879   procedure TfrmTemplateEditor.EnableControls(ok, Root: boolean);
880   begin
881     cbLock.Enabled := ok and (FCurTree = tvShared);
882     if (ok and Root) then
883     begin
884       ok := FALSE;
885       lblName.Enabled := TRUE;
886       edtName.Enabled := TRUE;
887       reNotes.ReadOnly := FALSE;
888     end
889     else
890     begin
891       lblName.Enabled := ok;
892       edtName.Enabled := ok;
893       reNotes.ReadOnly := not ok;
894     end;
895     lblNotes.Enabled := (not reNotes.ReadOnly);
896     UpdateReadOnlyColorScheme(reNotes, reNotes.ReadOnly);
897     cbxType.Enabled := ok;
898     lblType.Enabled := ok;
899     lblRemDlg.Enabled := ok;
900     cbxRemDlgs.Enabled := ok and FCanDoReminders;
901     cbActive.Enabled := ok;
902     cbExclude.Enabled := ok;
903     cbDisplayOnly.Enabled := ok;
904     cbFirstLine.Enabled := ok;
905     cbOneItemOnly.Enabled := ok;
906     cbHideDlgItems.Enabled := ok;
907     cbHideItems.Enabled := ok;
908     cbIndent.Enabled := ok;
909     edtGap.Enabled := ok;
910     udGap.Enabled := ok;
911     udGap.Invalidate;
912     lblLines.Enabled := ok;
913     reBoil.ReadOnly := not ok;
914     UpdateReadOnlyColorScheme(reBoil, not ok);
915     lblLink.Enabled := ok;
916     cbxLink.Enabled := ok;
917     ok := ok and FCanDoCOMObjects;
918     cbxCOMObj.Enabled := ok;
919     lblCOMObj.Enabled := ok;
920     edtCOMParam.Enabled := ok;
921     lblCOMParam.Enabled := ok;
922     UpdateInsertsDialogs;
923     EnableNavControls;
924   end;