Procedure

TCtrlInits.SetListOnly

Module

fODBase

Last Modified

7/15/2014 3:26:40 PM

Comments

Assigns list portion to a control from a section (used to set ShortList for meds)

Visibility

Public

Owner

TCtrlInits

Declaration

procedure SetListOnly(AControl: TControl; const ASection: string);

Calls Hierarchy


TCtrlInits.SetListOnly
 └TCtrlInits.FindInitByName

Called-By Hierarchy


                       TCtrlInits.SetListOnly
                    TfrmODMedIn.SetAltCombo┤ 
                  TfrmODMedIn.SetupDialog┤ │ 
          TfrmODMedIn.cboMedicationSelect┘ │ 
               TfrmODMedIn.CheckFormAlt┘   │ 
          TfrmODMedIn.cboDispenseExit┤     │ 
    TfrmODMedIn.cboDispenseMouseClick┘     │ 
 TfrmODMedIn.cboMedicationSelect...┘       │ 
                   TfrmODMedOut.SetAltCombo┘ 
                 TfrmODMedOut.SetupDialog┤   
         TfrmODMedOut.cboMedicationSelect┘   
              TfrmODMedOut.CheckFormAlt┘     
         TfrmODMedOut.cboDispenseExit┤       
   TfrmODMedOut.cboDispenseMouseClick┘       
TfrmODMedOut.cboMedicationSelect...┘         

Calls

Name Declaration Comments
TCtrlInits.FindInitByName function FindInitByName(const AName: string): TCtrlInit; -

Called-By

Name Declaration Comments
TfrmODMedIn.SetAltCombo procedure SetAltCombo; -
TfrmODMedOut.SetAltCombo procedure SetAltCombo; -


Source

448   procedure TCtrlInits.SetListOnly(AControl: TControl; const ASection: string);
449   { assigns list portion to a control from a section (used to set ShortList for meds) }
450   var
451     CtrlInit: TCtrlInit;
452   begin
453     CtrlInit := FindInitByName(ASection);
454     if CtrlInit = nil then Exit;
455     if      AControl is TMemo       then FastAssign(CtrlInit.List, TMemo(AControl).Lines)
456     else if AControl is TORListBox  then FastAssign(CtrlInit.List, TORListBox(AControl).Items)
457     else if AControl is TListBox    then FastAssign(CtrlInit.List, TListBox(AControl).Items)
458     else if AControl is TComboBox   then FastAssign(CtrlInit.List, TComboBox(AControl).Items)
459     else if AControl is TORComboBox then FastAssign(CtrlInit.List, TORComboBox(AControl).Items);
460   end;