General information
Category:
Forms & Form designer
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only