Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing All Textboxes on a Form
Message
De
29/10/2014 14:31:50
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01610125
Message ID:
01610127
Vues:
45
>Is there a way to reference all the textboxes on a Form?
>Currently, I have to reference each textbox individually to change the BackColor depending on Disabled=White or Enabled=Colored.
>The user can select the color they prefer in the program's setup form.
>If not, is there a way to set the textbox property BackColor to reference a variable?
>
>Colombo.

This depends from what you are doing

The SETALL might be your friend in such cases. But there are some things to consider.
The class parameter references the class of the object. If this is VFP textbox then it's fine. If not you need to run it for all classes you use.

If your fform is without containers its fine too.
If it is not plain but has containers that hold textboxes (baseclass container, page and column) you need to run through this containers recursive the change the textboxes inside those.
This requires to run through the objects collection of each level up from form. You need to test each object to be a container and change level. (special handling for pageframe / page containers ) You look at baseclass anyway for each object? So way not test against Baseclass="Textbox" and set your property at this place without SETALL ...

HTH

Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform