Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read Only Combo Box and Option Group
Message
De
16/09/1997 18:51:31
Shawn Edwards
Dallas Summer Musicals
Dallas, Texas, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00049624
Message ID:
00050315
Vues:
58
>>>Since there is no selection in the preferences menu for making items such as Combo Bodes, Spinners and Option Groups read only, is there a line of code I can write in a particular property that will make them so? I'd rather they couldn't edit the data in those fields unless they click the edit button.
>>
>>Combo.Enabled=.F.
>
>Alternatively, Shawn, if you don't want the 'grayed out' look of Enabled = .f., you can set a form property that is TRUE for readonly = TRUE, FALSE otherwise. In the WHEN method of your combo, option group, etc. put a line
>
>IF thisform.ReadOnlyProp = .T.
>   return .F.
>ELSE
>   return .T.
>ENDIF
>
>This keeps the control(s) from getting focus at all, but they still LOOK as if they were 'live', matching the other controls you changed with SetAll()
>
>You'll find this form property is useful in many other ways, such as button captions.
>
>HTH
>Barbara
I will use that idea. Since there was no selection for read-only in the field properties, that one should work best for me. Thanks for the clean and easy advice from a rather green Foxpro programmer. |-)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform