Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preventing users from changing the state of a Check Box
Message
De
07/03/1998 09:57:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
07/03/1998 07:58:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00083193
Message ID:
00083198
Vues:
30
>Hello again,
>
>I have a check box linked to a logical field. Sometimes in forms, I would like to display it's state, but don't want users to change it. I used the Object.enable=.f. property, but users are still able to click on it to change it's state. I also checked the Readonly property, but apparently it does not have that property. Any ideas how I can prevent users from changing the state of the checkbox
>
>BTW thank you all for providing answers to my previous questions. They all work...

Vozdra :)

You can set a property in the form when you want the checkboxes disabled, and in these checkboxes' .GotFocus simply put

if ThisForm.BoxesDisabled
this.lostfocus
endif

Another way is to put

return not thisform.BoxesDisabled

in the boxes' When event method. Of course, I have assumed you set this property to .t. when you want to forbid changing the checkboxes' state, and .f. when you want to allow it.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform