Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DoDefault()
Message
De
10/03/2004 18:08:25
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00884980
Message ID:
00885037
Vues:
13
Nirav,

VFP does not select a textbox when it is clicked. There is probably code in the GotFocus() of the parent class that causes this to happen. You'll see either This.SetFocus() or manipulation of This.SelLength in the method. See the KiloFox book for more info on this (this is the first tip I've used since buying the book recently). Still, it seems like this code is in the wrong place. The check for This.SelOnEntry should be in the class, not the textbox on the form.

>Yes, Daniel, that's what I thought. But testing it out with two textboxes, both with SelectOnEntry set to TRUE, but adding
>
DODEFAULT()
>to the GotFocus method of one of them produced different results. The one with DODEFAULT actually got "selected" when I clicked in it. The other didn't.
>
>Also, it seems to me that the "if This.SelectOnEntry" part is unnecessary. With the Dodefault code, if the flag is set to TRUE, then it will select the text, otherwise it won't.
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform