Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forms
Message
From
28/01/2000 02:47:21
Walter Meester
HoogkarspelNetherlands
 
 
To
27/01/2000 13:56:11
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Forms
Miscellaneous
Thread ID:
00323717
Message ID:
00323953
Views:
26
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			

       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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform