Information générale
Catégorie:
Gestionnaire d'écran & Écrans
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement