Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Edit and no edit of fields
Message
 
To
23/06/1998 10:52:37
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00110932
Message ID:
00110938
Views:
33
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
Map
View

Click here to load this message in the networking platform