Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
KeyPress
Message
De
28/10/2014 13:53:53
 
 
À
28/10/2014 13:43:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01610038
Message ID:
01610039
Vues:
46
>Greetings.
>
>I am trying to get a label's caption to reflect what is entered into a text box. In the KeyPress event I am using:
>if nKeyCode>0
> thisform.label1.caption=this.value
>endi
>Problem is the label caption updates one keystroke behind. For instance if I have so far typed in ABC, the label will only say AB
>
>Any ideas on how to change this to reflect what is actually in the textbox? Adding thisform.refresh makes no difference.
>
>Many thanks!

Try this:
if nKeyCOde>0
   dodefault(nKeyCode, nShiftAltCtrl)
   thisform.label1.caption = this.value
Endif
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform