|
-
January 27th, 2000, 06:55 AM
#1
Selecting everything by TAB key
Hello,
I am trying to TAB to one text box from another and I want whole of the test to be selected when I TAB into the next field,
Any Help,
Thankx in advance
-
January 27th, 2000, 07:00 AM
#2
Re: Selecting everything by TAB key
private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = len(Text1.Text)
End Sub
-
January 27th, 2000, 07:01 AM
#3
Re: Selecting everything by TAB key
Try something like :
'
private Sub Text1_GotFocus()
GotFocus Text1
End Sub
'
private Sub Text2_GotFocus()
GotFocus Text2
End Sub
'
private Sub GotFocus(oTxt as TextBox)
on error resume next
'
oTxt.SelStart = 0
oTxt.SelLength = len(oTxt.Text)
'
End Sub
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|