Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Don't want backspace in textbox to move focus
Message
From
07/07/2000 21:05:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Don't want backspace in textbox to move focus
Miscellaneous
Thread ID:
00389768
Message ID:
00389768
Views:
57
It seems the default behaviour of textboxes (and presumably editboxes), is that if you press backspace when at the beginning of the control, the focus moves to the previous control in tab order. So if you hold down backspace, you can end up not just deleting the current field, but previous fields as well.

Is there something I can put in my textbox class to prevent this happening, as it doesn't seem like standard UI behaviour to me.

I tried

IF lastkey()=127
RETURN .F.
ENDIF

in the Valid of the control, but (a) this displays 'invalid input' in the corner, and (b), if the last key was backspace, but you specifically try and move to another field using the mouse, the lastkey is still valid, and it won't let you move.

Ben
Next
Reply
Map
View

Click here to load this message in the networking platform