|
-
Oct 6th, 2008, 06:49 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] [2008] Highlight a textbox
Hi to all:
I would like highlight a textbox when this textbox got the focus...
I had search in the properties of the textbox but i can't see any propertie that could do this...
Any suggestion to do this?
Thanks
Last edited by sacramento; Oct 6th, 2008 at 07:03 AM.
-
Oct 6th, 2008, 06:51 AM
#2
Lively Member
Re: [2008] Highlight a textbox
What do you mean highlight the textbox? Highlight a certain word in the box? Change the background color of the textbox?
-
Oct 6th, 2008, 06:52 AM
#3
Thread Starter
Frenzied Member
Re: [2008] Highlight a textbox
Highlight the text in a textbox
-
Oct 6th, 2008, 06:53 AM
#4
Lively Member
Re: [2008] Highlight a textbox
-
Oct 6th, 2008, 06:56 AM
#5
Thread Starter
Frenzied Member
Re: [2008] Highlight a textbox
-
Oct 6th, 2008, 06:58 AM
#6
Lively Member
Re: [2008] Highlight a textbox
Code:
Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus
TextBox1.SelectionStart = 0
TextBox1.SelectionLength = TextBox1.Text.Length
End Sub
Worked for me. Hope this helps.
-
Oct 6th, 2008, 07:02 AM
#7
Thread Starter
Frenzied Member
Re: [2008] Highlight a textbox
Hi:
Very simple and work very well..
Thanks a lot
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
|