Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Editing fields without using the mouse
Message
 
À
13/03/2003 16:00:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00765549
Message ID:
00765604
Vues:
24
Thank you very much for your code.
This works perfekt for the right arrow, but to have it work for the left arrow I made this modification:
***
do case
case nKeyCode = 4 and nshiftaltctrl = 0
with this
if .selLength > 0
.selStart = .selStart + .selLength
nodefault
endif
endwith
case nKeyCode = 19 and nshiftaltctrl = 0
with this
if .selLength > 0
.selStart = .selStart
nodefault
endif
endwith
endcase
***
But schould not this behaviour be a ground standard in VFP as in other programs?
It must be wrong to make my own code to do this???
/Kjell



>Kjell,
>
>Putting this in your keypress() method will cause it to behave like the editbox (you can put it in your baseclass):
>
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>if nKeyCode = 4 and nshiftaltctrl = 0
>    with this
>        if .selLength > 0
>            .selStart = .selStart + .selLength
>            nodefault
>        endif
>    endwith
>endif
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform