Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any way to select from current position in textbox?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01007207
Message ID:
01007224
Vues:
14
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform