Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I get a listing of ControlSources in a form?
Message
De
16/10/2001 13:16:15
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00569049
Message ID:
00569132
Vues:
26
This message has been marked as a message which has helped to the initial question of the thread.
>I was wondering if it's possible to get a printout of all the ControlSources used in a form?

Is this design time or run time? If design time you can use ASELOBJ() to get a reference to the form object open in the designer, and then use J. Crescencio's algorithm. Post back here if you need help drilling down into containers, but it's not too difficult. The general idea is have a function you pass an object ref, then the loop goes through the controls collection. If it's a container you pass that object to the same function recursively.

Something like:
*!* MODIFY FORM, then switch to this
CLEAR
DIMENSION Y[1]
x=ASELOBJ(Y,1)

DrillDown(Y)

FUNCTION DrillDown(toO)
	LOCAL o
	FOR EACH o IN toO.OBJECTS
		IF TYPE( 'o.ControlSource' ) = "C"
			?o.name, o.parent.name, o.ControlSource
		ENDIF
		IF PEMSTATUS(O, "OBJECTS", 5)
			DrillDown(o)
		ENDIF
	NEXT o
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform