Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Iterate through all objects on form
Message
 
 
À
30/12/2008 15:23:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01370241
Message ID:
01370250
Vues:
29
Good catch with the Pageframes. You get virtual stars for that ;-)

>>How do I loop through all the objects on a form that have a specific method?
>
>Something like:
>
>
>*--Check all objects on pages on any pageframe as well
>loForm = THISFORM
>FOR EACH oObject IN loForm.Objects
>	IF ALLTRIM(UPPER(oObject.BASECLASS))="PAGEFRAME" && step through the pageframe
>		FOR EACH loPage IN oObject.PAGES
>			FOR EACH oControl IN loPage.CONTROLS
>				IF ALLTRIM(UPPER(oControl.BASECLASS)) = "TEXTBOX"
>					wait WINDOW oControl.Name+" value: "+ oControl.value
>				ENDIF
>				IF LOWER(oControl.Name) = "myobject"
>					Wait WINDOW "PageFrame Page " + loPage.Name + " Value is: " + oControl.Value
>				ENDIF
>			ENDFOR
>		ENDFOR
>	ELSE
>		IF ALLTRIM(UPPER(oObject.BASECLASS))="TEXTBOX"
>			IF PEMSTATUS(oObject,'Format',5)
>				wait WINDOW "Form Object "+oObject.Name + [ has the Format Property]
>			ENDIF
>		ENDIF
>	ENDIF
>ENDFOR
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform