Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for existence of a control
Message
 
À
18/09/2002 17:18:11
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00701952
Message ID:
00702389
Vues:
16
Many ways to skin the cat!

>>It escapes me the syntax for checking for the existence of a control like a commandbutton. If...............?
>>
>>-TB
>
>
>you already have other replies, but another way is
>
>
>FUNCTION Form_Has_This_Control
>  PARAMETER PARAM_Form_Ref , PARAM_Control_Name
>
>  LOCAL int_Control_Count
>  LOCAL int_Control_Index
>  LOCAL str_Control_Name
>  LOCAL boo_Value_To_Return
>
>  boo_Value_To_Return = .F.
>  int_Control_Count = PARAM_Form_Ref.CONTROLCOUNT
>
>  FOR int_Control_Index = 1 TO int_Control_Count
>    str_Control_Name = PARAM_Form_Ref.CONTROLS(int_Control_Count).NAME
>    IF ( str_Control_Name = PARAM_Control_Name )
>      boo_Value_To_Return = .T.
>    ENDIF
>  ENDFOR
>
>  RETURN ( boo_Value_To_Return )
>ENDFUNC
>
>
>may want to do ALLTRIM(UPPER(X)) on both items in IF stmt.
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform