General information
Category:
Forms & Form designer
Title:
Don't want backspace in textbox to move focus
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
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