-
Jan 26th, 2013, 12:18 AM
#1
Thread Starter
Member
[RESOLVED] Text Box Question
I would like to make a text box that display a predefined text in it - once clicked, the text would then disappear, so the user doesn't have to annoyingly delete the default text before adding their own.
Could any of you assist me with this?
I tried the google machine, but didnt come up with much other than really basic text box tutorials.
Thank you for your time!
-
Jan 26th, 2013, 12:30 AM
#2
Frenzied Member
Re: Text Box Question
just enter the text you want in the Text properties of the textbox
the on the click event you delete the text TextBox.Clear
-
Jan 26th, 2013, 01:06 AM
#3
Re: Text Box Question
Hi,
Have a look at this thread which discusses and demonstrates how to create a Watermark for your TextBoxes:-
Wierd, not able to post the link??
Search for this in Google "vb dot net forums Troubles Overriding TextBox" and the link is at the top of the list.
Hope that helps.
Cheers,
Ian
Last edited by IanRyder; Jan 26th, 2013 at 01:15 AM.
-
Jan 26th, 2013, 01:26 AM
#4
Thread Starter
Member
-
Jan 26th, 2013, 01:48 AM
#5
Re: [RESOLVED] Text Box Question
You may also want to consider using .SelectAll instead of clear which would just highlight the existing text
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
|