Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to select from current position in textbox?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01007207
Message ID:
01007224
Views:
13
That's what I was headed towards but form some reason, SelStart always has the value of 0 when I'm in the KeyPress event.

Have you tried this?

Rodd

>Rodd,
>
>Try something like this in the KeyPress event
>
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>local lcLeftString, lnLeftComma, lcRightString, lnRightComma
>
>if nKeyCode = 127
>	lcleftString		= Left(this.Value, this.SelStart)
>	lnLeftComma		= Rat(',', lcLeftString)
>	lcRightString		= Substr(this.Value, this.SelStart + 1)
>	lnRightComma		= At(',', lcRightString)
>	this.Value		= Left(this.Value, lnLeftComma) + Substr(this.Value, this.SelStart + lnRightComma + 1)
>	this.SelStart		= lnLeftComma
>	nodefault
>endif
>
>
>It needs some fine tunning, but i think it basically works
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform