Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SelectOnEntry in Textbox
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
SelectOnEntry in Textbox
Divers
Thread ID:
00855187
Message ID:
00855187
Vues:
61
Hello,

I tried to get the following done, but it does not work:
When the user clicks into a textbox, the text should be selected, exactly as when tabbing into the textbox and the property .SelectOnEntry = .T.

There is a FAQ by Evan Delay, 7867, that suggests to put DODEFAULT() into the GotFocus() event of the textbox, but that does not show results.

I tried the following in the GotFocus() event:
THIS.SelStart=0
THIS.SelLength=LEN(ALLTRIM(TRANSFORM(THIS.VALUE)))
This would work relatively fine, except when the value is longer than the textbox shows, which results in shifting the entire selected text to the left. That is confusing for the user.

Is there a way to accomplish this?
Thanks for your help in advance!
Christian Isberner
Software Consultant
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform