Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing objects properties programmatically
Message
De
18/09/1997 18:48:46
 
 
À
18/09/1997 15:38:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00050589
Message ID:
00050627
Vues:
19
Edward,

Yet another way is the
FOR EACH. . . ENDFOR
statement.

According to an article in FoxPro Advisor a few months back, this may be the "best" way to do it because, amonst other things, you could add or delete objects right in the loop and they too would become subject (or omitted, if released). Thus, it sort of is dynamic.

Cheers,
Jim N

>>I want to change a property of all the objects on a form programmatically. As in making everyting enabled -= .f. to enabled = .t.
>>
>>What property tells me the total number of objects on the form (tab index?) so I can write a loop from i to x to hit all the existing objects?
>>
>>Is there a better way to accomplish this?
>>
>>Thanks-
>
>There are couple ways:
>1. Use AMEMBERS(,2) to return names of objects.
>2. Issue Form.SetAll("enabled",.f.) if you are sure that all objects have Enabled property.
>3. Use Form.ControlCount and Form.Controls(i).Enabled=.f.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform