Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selects all the text when the control gets the focus
Message
 
À
13/03/2001 10:39:38
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00484452
Message ID:
00484455
Vues:
9
>Hello everyone.
>
>Does anyone knows how to accomplish this? :
>Selects all the text when the control gets the focus.
>
>I am using a a text control and I would like to select all the text when the control gets the focus.
>In VFP is done by setting the format property of the text control to 'F'.
>
>Thanks,
>Sergio

This way:
Private Sub Text1_GotFocus()
    With Text1
        .SelStart = 0
        .SelLength = Len(.Text)
    End With
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform