Procedure

ClearControl

Module

fODBase

Last Modified

7/15/2014 3:26:40 PM

Comments

Procedures shared with descendent forms 

 clears a control, removes text and listbox items

Scope

Interfaced

Declaration

procedure ClearControl(AControl: TControl);

Called-By Hierarchy


                                                    ClearControl
                                         TCtrlInits.SetControl┤ 
                                      TfrmODMedIn.InitDialog┤ │ 
                                    TfrmODMedIn.FormCreate┘ │ │ 
                                   TfrmODMedIn.SetOnOISelect┤ │ 
                                   TfrmODMedIn.SetupDialog┤ │ │ 
                           TfrmODMedIn.cboMedicationSelect┘ │ │ 
                                TfrmODMedIn.CheckFormAlt┘   │ │ 
                           TfrmODMedIn.cboDispenseExit┤     │ │ 
                     TfrmODMedIn.cboDispenseMouseClick┘     │ │ 
                  TfrmODMedIn.cboMedicationSelect...┘       │ │ 
                                          ExecuteComplexDose┤ │ 
                              TfrmODMedOut.cmdComplexClick┘ │ │ 
                                     TfrmODMedOut.FormCreate┤ │ 
                                     TfrmODMedOut.InitDialog┤ │ 
                                   TfrmODMedOut.FormCreate┘ │ │ 
                                  TfrmODMedOut.SetOnOISelect┤ │ 
                                  TfrmODMedOut.SetupDialog┤ │ │ 
                          TfrmODMedOut.cboMedicationSelect┘ │ │ 
                               TfrmODMedOut.CheckFormAlt┘   │ │ 
                          TfrmODMedOut.cboDispenseExit┤     │ │ 
                    TfrmODMedOut.cboDispenseMouseClick┘     │ │ 
                 TfrmODMedOut.cboMedicationSelect...┘       │ │ 
                                       TfrmODProc.InitDialog┤ │ 
                                     TfrmODProc.FormCreate┤ │ │ 
                                  TfrmODProc.cboProcSelect┘ │ │ 
                                TfrmODProc.radInpatientClick┤ │ 
                               TfrmODProc.radOutpatientClick┤ │ 
                                       TfrmODCslt.InitDialog┤ │ 
                                     TfrmODCslt.FormCreate┘ │ │ 
                                TfrmODCslt.radInpatientClick┤ │ 
                               TfrmODCslt.radOutpatientClick┤ │ 
                                        TfrmODRad.InitDialog┤ │ 
                                     TfrmODRad.SetupDialog┤ │ │ 
                                 TfrmODRad.ImageTypeChange┘ │ │ 
                                 TfrmODRad.cboImTypeExit┤   │ │ 
                        TfrmODRad.cboImTypeDropDownClose┘   │ │ 
                                        TfrmODLab.FormCreate┤ │ 
                                        TfrmODLab.InitDialog┤ │ 
                                      TfrmODLab.FormCreate┘ │ │ 
                                      TfrmODLab.LoadCollType┤ │ 
                               TfrmODLab.cboCollSampChange┤ │ │ 
                                   TfrmODLab.SetupDialog┤ │ │ │ 
                            TfrmODLab.cboAvailTestSelect┘ │ │ │ 
                                 TfrmODLab.SetupDialog┤   │ │ │ 
                            TfrmODLab.cboAvailTestExit┘   │ │ │ 
                     TfrmODLab.DetermineCollectionDefaults┘ │ │ 
                                   TfrmODLab.SetupDialog┤   │ │ 
                         TfrmODLab.cboAvailTestSelect...┘   │ │ 
                                    TfrmODLab.SetupCollTimes┤ │ 
                                      TfrmODLab.FormCreate┤ │ │ 
                                     TfrmODLab.SetupDialog┤ │ │ 
                                 TfrmODLab.LoadCollType...┤ │ │ 
                               TfrmODLab.cboCollTypeChange┤ │ │ 
                  TfrmODLab.DetermineCollectionDefaults...┘ │ │ 
                    TfrmODLab.DetermineCollectionDefaults...┤ │ 
                                      TfrmODBBank.FormCreate┤ │ 
                                  TfrmODBBank.SetupCollTimes┤ │ 
                                  TfrmODBBank.LoadCollType┤ │ │ 
                 TfrmODBBank.DetermineCollectionDefaults┘ │ │ │ 
                        TfrmODBBank.cboAvailTestSelect┘   │ │ │ 
                             TfrmODBBank.SetupDialog┤     │ │ │ 
                        TfrmODBBank.cboAvailTestExit┘     │ │ │ 
                TfrmODBBank.DetermineCollectionDefaults...┤ │ │ 
                             TfrmODBBank.cboCollTypeChange┘ │ │ 
                                 TfrmODBBank.LoadCollType...┤ │ 
                  TfrmODBBank.DetermineCollectionDefaults...┤ │ 
                                      TfrmODMedIV.InitDialog┤ │ 
                                    TfrmODMedIV.FormCreate┘ │ │ 
                                     TfrmODVitals.InitDialog┤ │ 
                                   TfrmODVitals.FormCreate┘ │ │ 
                                 TfrmODMedNVA.SetOnMedSelect┤ │ 
                                  TfrmODMedNVA.SetupDialog┤ │ │ 
                               TfrmODMedNVA.btnSelectClick┤ │ │ 
                               TfrmODMedNVA.UMDelayClick┘ │ │ │ 
                             TfrmODMedNVA.CheckFormAltDose┘ │ │ 
                             TfrmODMedNVA.cboDosageClick┘   │ │ 
                            TfrmODMedNVA.cboDosageExit┘     │ │ 
                                       TfrmODMeds.FormCreate┤ │ 
                                   TfrmODMeds.SetOnMedSelect┤ │ 
                                    TfrmODMeds.SetupDialog┤ │ │ 
                                 TfrmODMeds.btnSelectClick┤ │ │ 
                                 TfrmODMeds.UMDelayClick┘ │ │ │ 
                               TfrmODMeds.CheckFormAltDose┘ │ │ 
                               TfrmODMeds.cboDosageClick┘   │ │ 
                             TfrmODMeds.cboDosageKeyUp┘     │ │ 
                                    TfrmODAllergy.FormCreate┤ │ 
                                    TfrmODAllergy.InitDialog┘ │ 
                                  TfrmODAllergy.FormCreate┤   │ 
                             TfrmODAllergy.DisableControls┤   │ 
                   TfrmODAllergy.ckNoKnownAllergiesClick┘ │   │ 
                              TfrmODAllergy.EnableControls┘   │ 
                   TfrmODAllergy.ckNoKnownAllergiesClick┘     │ 
                                TfrmODBase.ClearDialogControls┤ 
                                       TfrmODBase.InitDialog┤ │ 
                                      TfrmODBase.ValidSave┤ │ │ 
                               TfrmODBase.cmdAcceptClick┤ │ │ │ 
                                   ActivateOrderDialog┘ │ │ │ │ 
                           TfrmRemDlg.btnFinishClick┤   │ │ │ │ 
           TfrmConsults.mnuActNewConsultRequestClick┤   │ │ │ │ 
                   TfrmConsults.cmdNewConsultClick┘ │   │ │ │ │ 
                TfrmConsults.mnuActNewProcedureClick┤   │ │ │ │ 
                      TfrmConsults.cmdNewProcClick┘ │   │ │ │ │ 
                                        ChangeOrders┤   │ │ │ │ 
                      TfrmOrders.mnuActChangeClick┤ │   │ │ │ │ 
                        TfrmMeds.mnuActChangeClick┘ │   │ │ │ │ 
                                     ChangeOrdersEvt┤   │ │ │ │ 
                                          CopyOrders┤   │ │ │ │ 
                        TfrmOrders.mnuActCopyClick┤ │   │ │ │ │ 
                          TfrmMeds.mnuActCopyClick┤ │   │ │ │ │ 
                           TfrmODActive.btnOKClick┘ │   │ │ │ │ 
                                      TransferOrders┤   │ │ │ │ 
                        TfrmOrders.mnuActCopyClick┤ │   │ │ │ │ 
                          TfrmMeds.mnuActCopyClick┤ │   │ │ │ │ 
                           TfrmODActive.btnOKClick┘ │   │ │ │ │ 
                            TfrmOrders.lstWriteClick┤   │ │ │ │ 
               TfrmOrders.PlaceOrderForDefaultDialog┤   │ │ │ │ 
                  TfrmOrders.DisplayDefaultDlgList┤ │   │ │ │ │ 
                       TfrmOrders.ResetOrderPage┘ │ │   │ │ │ │ 
               TfrmOrders.btnDelayedOrderClick┘   │ │   │ │ │ │ 
                                 DisplayEvntDialog┤ │   │ │ │ │ 
                             SetDelayEventForMed┘ │ │   │ │ │ │ 
                      TfrmMeds.mnuActCopyClick┘   │ │   │ │ │ │ 
                                 DisplayEvntDialog┤ │   │ │ │ │ 
                                  SetViewForCopy┘ │ │   │ │ │ │ 
                    TfrmOrders.mnuActCopyClick┘   │ │   │ │ │ │ 
                                 DisplayEvntDialog┘ │   │ │ │ │ 
                                ExecuteChangeEvt┘   │   │ │ │ │ 
                 TfrmOrders.mnuActChgEvntClick┘     │   │ │ │ │ 
                             TfrmMeds.mnuActNewClick┤   │ │ │ │ 
                           TfrmOMNavA.ActivateDialog┤   │ │ │ │ 
                         TfrmOMNavA.grdMenuKeyDown┤ │   │ │ │ │ 
                         TfrmOMNavA.grdMenuMouseUp┘ │   │ │ │ │ 
                                TfrmOMSet.DoNextItem┘   │ │ │ │ 
                              TfrmOMSet.InsertList┤     │ │ │ │ 
                               ActivateOrderList┘ │     │ │ │ │ 
                     TfrmRemDlg.btnFinishClick┤   │     │ │ │ │ 
                             ActivateOrderHTML┤   │     │ │ │ │ 
                    TfrmOrders.lstWriteClick┤ │   │     │ │ │ │ 
    TfrmOrders.PlaceOrderForDefaultDialog...┘ │   │     │ │ │ │ 
                              ActivateOrderSet┤   │     │ │ │ │ 
                   TfrmRemDlg.btnFinishClick┤ │   │     │ │ │ │ 
TfrmConsults.mnuActNewConsultRequestClick...┤ │   │     │ │ │ │ 
     TfrmConsults.mnuActNewProcedureClick...┤ │   │     │ │ │ │ 
                    TfrmOrders.lstWriteClick┤ │   │     │ │ │ │ 
    TfrmOrders.PlaceOrderForDefaultDialog...┤ │   │     │ │ │ │ 
                     TfrmMeds.mnuActNewClick┤ │   │     │ │ │ │ 
                TfrmOMNavA.ActivateDialog...┤ │   │     │ │ │ │ 
                     TfrmOMSet.DoNextItem...┘ │   │     │ │ │ │ 
                       TfrmOMNavA.DoSelectList┘   │     │ │ │ │ 
                     TfrmOMNavA.grdMenuKeyUp┤     │     │ │ │ │ 
                   TfrmOMNavA.grdMenuMouseUp┘     │     │ │ │ │ 
                                        SkipToNext┤     │ │ │ │ 
                         TfrmOMSet.DoNextItem...┘ │     │ │ │ │ 
                            TfrmOMSet.UMDelayEvent┘     │ │ │ │ 
                               TfrmODBase.FormCloseQuery┤ │ │ │ 
                                     TfrmODBase.TabClose┤ │ │ │ 
                            TfrmODAllergy.cmdAcceptClick┘ │ │ │ 
                              TfrmODBase.cmdAcceptClick...┤ │ │ 
                                       TfrmODBase.TabClose┘ │ │ 
                                     TfrmODBase.ValidSave...┤ │ 
                                TfrmODBase.cmdAcceptClick...┘ │ 
                                          TfrmODGen.InitDialog┤ 
                                  TfrmODMedIn.ResetOnMedChange┤ 
                                     TfrmODMedIn.SetupDialog┤ │ 
                          TfrmODMedIn.cboMedicationSelect...┘ │ 
                                 TfrmODMedOut.ResetOnMedChange┤ 
                                    TfrmODMedOut.SetupDialog┤ │ 
                         TfrmODMedOut.cboMedicationSelect...┘ │ 
                                  TfrmODRad.cboProcedureSelect┘ 
                                  TfrmODRad.cboProcedureExit┘   

Called-By

Name Declaration Comments
TfrmODRad.cboProcedureSelect procedure cboProcedureSelect(Sender: TObject); -
TfrmODBase.ClearDialogControls procedure ClearDialogControls; -
TfrmODGen.InitDialog procedure InitDialog; override; -
TfrmODMedIn.ResetOnMedChange procedure ResetOnMedChange; -
TfrmODMedOut.ResetOnMedChange procedure ResetOnMedChange; -
TCtrlInits.SetControl procedure SetControl(AControl: TControl; const ASection: string); -


Source

260   procedure ClearControl(AControl: TControl);
261   { clears a control, removes text and listbox items }
262   begin
263     if AControl is TLabel then with TLabel(AControl) do Caption := ''
264     else if AControl is TStaticText then with TStaticText(AControl) do Caption := ''
265     else if AControl is TButton then with TButton(AControl) do Caption := ''
266     else if AControl is TEdit then with TEdit(AControl) do Text := ''
267     else if AControl is TMemo then with TMemo(AControl) do Clear
268     else if AControl is TRichEdit then with TRichEdit(AControl) do Clear
269     else if AControl is TORListBox then with TORListBox(AControl) do Clear
270     else if AControl is TListBox then with TListBox(AControl) do Clear
271     else if AControl is TORComboBox then with TORComboBox(AControl) do
272     begin
273       Items.Clear;
274       Text := '';
275     end
276     else if AControl is TComboBox then with TComboBox(AControl) do
277     begin
278       Clear;
279       Text := '';
280     end;
281   end;