Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tabbing to a new field
Message
 
To
01/11/2000 21:23:54
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00436988
Message ID:
00436992
Views:
21
>I have a series of textboxes to tab through. The textboxes contain numeric data so I set text alignment to right justify. When I tab through the fields the cursor is being placed on the left side of the data instead of the right. How do I change that? Also, is there a way to have all of the text highlighted instead of just a cursor?

To have the data highlighted in a textbox, you need to add this code:
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
Previous
Reply
Map
View

Click here to load this message in the networking platform