Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Iterate through all objects on form
Message
 
 
To
30/12/2008 15:23:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01370241
Message ID:
01370250
Views:
27
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
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform