Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to stop the grid to automatically go to next column
Message
 
 
To
07/10/2002 14:23:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00708467
Message ID:
00708494
Views:
8
Here is my solution:

add a new property to your textbox class StopNow.

In the KeyPress put this code:
lparameters nKeyCode, nShiftAltCtrl
if this.maxlength > 0 
	if inlist(m.nKeyCode,9,13) && Tab or Enter (otherwise don't let to move focus to another control)
	   this.StopNow = .f.
	endif   
endif
In the LostFocus:
if this.StopNow
   nodefault && Don't loose focus
endif
InteractiveChange:
if this.maxlength >0 and len(alltrim(this.text))>=this.maxlength
		this.StopNow = .t.
*		nodefault && ??
*       this.value = this.value && Try to force update in the table
endif
>Hello
>
>How to stop the grid to automatically go to next column,but i should go only after pressing enter or tab.
>
>say if grid column is 5 digits after the user enters the 5 digits it goes to the next column,but acidentally if users type 6 chars it replaces the next column with the 6th char.
>
>how to avoid it.
>
>txs for any input
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform