Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Edit and no edit of fields
Message
 
À
23/06/1998 10:52:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00110932
Message ID:
00110938
Vues:
32
Two ways to control entering data in a field occur to me offhand. The wya I prefer to to set the enabled to .f. on each data field. If you don't want tohe colour to be that dark grey when it is disabled, set the disabledforecolour and disabledbackcolor properties to match the nomral colors you are using in textboxes.

I usually cycle through the textboxes, and whatever other data controls with something like

for i = 1 to thisform.controlcount
IF thisform.controls(i).baseclass="textbox" && Or whatever objects you use
&& For data entry
thisform.controls(i).enabled=.t. && or .t. to enabled them
endif
endfor

This seems to me to be the easiest method. Otherwise you could have a variable, say glediting, set to .T. when editing and .F. otherwise. In the gotfocus of each data control, put:

IF !glediting
NODEFAULT && So the control isnt disabled, but can't get focus
ENDIF

--
Jerry Ritcey
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform