Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forms
Message
From
28/01/2000 05:17:28
 
 
To
28/01/2000 02:47:21
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Forms
Miscellaneous
Thread ID:
00323717
Message ID:
00323971
Views:
23
>Gan,
>
>You can also use FOR EACH to spin through the controls:
>
>
>PROCEDURE SpinTroughObjects
>LPARAMETER oObject
>LOCAL oSPinObject, oPage
>
>FOR EACH oSPinObject IN  oObject.Controls
>    DO CASE
>       CASE oSPinObject.BASECLASS="Container"
>            THISFORM.SpinTroughObjects(oSPinObject)
>
>       CASE oSPinObject.BASECLASS="Pageframe"
>            FOR EACH oPage IN oSpingObject.Pages
>		THISFORM.SpinTroughObjects(oPage)
>            ENDFOR			
>

Good idea;  you need to add the other cases on container-thingies, like grids,
columns and other baseclass types that may be acting as generic containers.

>       OTHERWISE
>            DO SomeAction
>    ENDCASE
>ENDFOR
>RETURN
>
>
>This code shoud be paced in a method on the form and can be called recursevely in case you also want to spin trough the controls in a container or pageframe.
>
>Walter,
>
>>Is there a property in the form that identifies the total number of objects ( textboxs, grids, labels, etc) in the form?
>>
>>I believe there a property of OBJECTS and COLLECTION. However it does not tell us how many object are in the form?
>>
>>I am trying to spin through all the objects in a form but without knowing the total objects in the form I will not able to store all the objects value.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform