Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select entire value in textbox with mouse.
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Select entire value in textbox with mouse.
Divers
Thread ID:
00257862
Message ID:
00257862
Vues:
58
Over time there have been many threads asking the question of how to select the entire value in a textbox when clicked on with the mouse. Most replies revolved around the .SelStart and .SelLength properties in the .Click Event.

I read a tip in FoxPro Advisor that, IMO, is a better way and thought I'd post it for those that missed it.

.SelectOnEntry = .T.
Put DODEFAULT() in the .GotFocus Event of the textbox

This will cause the entire value in the textbox to be selected when TABbing in. Also, if the user clicks on the textbox once the entire value will be selected, and if they click on it again the cursor will be positioned where clicked. More desirable functionality, IMO, and my users like it already.

Cheers,
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform