|
-
Sep 13th, 2000, 06:19 AM
#1
Thread Starter
Junior Member
Here's my problem.
I've got a couple of textboxes where you can go through by the TAB stops.
Now I want to selct the text in the textbox, so it get's blue, and onde you type the original text dissappears and the new text appears.
At the moment you have to delete the original text first ( by a couple of backspaces, pretty annoying)
Anyone of you got a solution ?
Kleinvaag
-
Sep 13th, 2000, 06:26 AM
#2
Addicted Member
Hi,
Try this for each text box you have:
Code:
Private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
Hope this helps
Shaun
Web/Application Developer
VB6 Ent (SP5), Win 2000,SQL Server 2000
-
Sep 13th, 2000, 06:29 AM
#3
Hyperactive Member
In the gotfocus event set
txtbox.selstart=0
txtbox.sellength=len(txtbox.text)
where txtbox is your textbox
now when you tab onit it will be blue and typing will overwrite the contents.
Regards
Chris
-
Sep 13th, 2000, 06:38 AM
#4
Thread Starter
Junior Member
Hi Chrisa_uk adn S@NSIS,
It works :-)
Thx a lot.
Kleinvaag
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
|