Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Go to specific location in a text box
Message
De
01/06/2007 08:54:37
 
 
À
31/05/2007 22:04:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01229658
Message ID:
01229767
Vues:
21
This message has been marked as the solution to the initial question of the thread.
I have a text box with an input mask of '0-99999' and a format of K. I would like the cursor to be in the 3rd column, i.e. after the '0-' when entering new data.

This code in the GotFocus():
Textbox::GotFocus()
This.SelStart = 3
NODEFAULT
The reason you have to do it like this is because, by default, the native VFP method code ( if there is any ) runs after any of your custom code. The native behavior of GotFocus() is to reset SelStart and SelLen. So you need to have the native behavior occur before you set these properies and not after.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform