Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I count the number of objects on a form ??
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00542169
Message ID:
00542177
Vues:
20
Hi!

Yes. The form and container objects have methods AddObject and NewObject that you can use to add your own or default objects. There is also RemoveObject method. There is a collection 'Objects' in container or form (available in run-time only) that you can use to work with any form object by index in collection. There is Controls collection - similar to Objects. Number of objects in collection - ControlCount. However, if you have a container on form, only container will be in these collections, so if you want a real number of all objects on the form, you will require to count on objects inside of container, container in container etc. - through all objects containership tree. SSeveral VFP objects could be containers, you can see which of them in the 'Applies To' list of objects in help for method 'AddObject'.

HTH.

>I would like to remove and add objects from/to my form at run time, depending on some settings. Is this possible ?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform