Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set everything on form as readonly
Message
De
06/12/2005 12:53:02
 
 
À
06/12/2005 11:56:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01075376
Message ID:
01075417
Vues:
8
>hi all. for security purpose when certain group of users log in, i want to set everything on all forms as readonly.
>i am thinking of creating a custom class and put it on the form. now in the init of this class, i will loops through each and every control on th form and mark them as readonly or enable=.f. . the code has to be recursive so that if there is a pageframe or container object on form , it goes and loops through all objects on pageframe/container too.
>
>i am wondering though if this is the correct idea and also if there is some already available such class out there.
>
>thanks all for help in advance.



You could use a form of SetAll() to set R/O or enabled = .F.

The proper OO way, and one that is part (or should be) of any OO Framework is to have each subclassed control with init and refresh code that 'listens' to some condition (could be Edit vs Nav mode, and/or security permissions), then sets itself to enabled/disabled as needed, or even invisible if the security requirements ask for it.

HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform