Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ticking Checkbox by mouse or spacebar only.
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00049767
Message ID:
00049791
Views:
71
>>>Hi all,
>>>
>>>Does anyone knows how to prevent checkboxes from being checked when RETURN key is press? If possible , checking can only be done on mouse click or spacebar... Thanks.
>>
>>put this code in the KeyPress event of the check box
>>
>>
if lastkey()=13
>>   this.value=iif(this.value=1,0,1)
>>endif
>
>after testing a little further, if the user presses Shift+Enter, the value of the check box changes even though the value of LastKey() is still 13. Also focus remains on the check box. I am doing this in VFP 3.0b. This must be an undocumented feature.

Last response: works regardless when you put the code in LostFocus method.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform