Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Y/N value in text boxes bound to logical fields
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00183791
Message ID:
00183805
Views:
18
Well you can still use a text box with Y in the inputmask. You could also make the enter key move to the next field from a checkbox by putting this in the check box's KeyPress event:
LPARAMETERS nKeyCode, nShiftAltCtrl

IF nKeyCode=13
	NODEFAULT
	KEYBOARD "{TAB}"
ENDIF
You could even make Y and N check and uncheck the box (though the space key works by default) with some additional code in KeyPress.

>In 2.6, I used the "Y" format code to display Y/N in a logical @GET. Whilst I could use the obvious check box in VFP, the value "toggles" when a user presses "Enter" through the check box. My system is for rapid data entry where the mouse is, at input stage, rarely used for speed reasons. For simple Y/N value fields, what would be the best way to handle this situation without using a check box? If you "Enter" through an @GET with a "Y" code, you simply move through the field without changing the value. This is the sort of behaviour I need.
>
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform