|
-
Mar 26th, 2005, 01:27 AM
#1
Thread Starter
Addicted Member
Textbox select
i want a text box's text to get selected when it gets focus
-
Mar 26th, 2005, 01:38 AM
#2
Re: Textbox select
Correction.. This will do it.
VB Code:
Option Explicit
Private Sub Command1_Click()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
text1.setfocus
End Sub
Last edited by dglienna; Mar 26th, 2005 at 01:59 AM.
-
Mar 26th, 2005, 01:49 AM
#3
Thread Starter
Addicted Member
Re: Textbox select
hi actually i tried to use these properties as well but couldnt something out of it
can u explain the purpose of these as well !
-
Mar 26th, 2005, 02:01 AM
#4
Re: Textbox select
I figured it out.
SelStart tells it where to start the selection
SelLength tells it how long the string is (the length gets calculated)
SetFocus HIGHLIGHTS it.
It took a minute, but I figured it out.
-
Mar 26th, 2005, 02:09 AM
#5
Thread Starter
Addicted Member
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
|