Results 1 to 5 of 5

Thread: [RESOLVED] Text Box Question

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2013
    Posts
    50

    Resolved [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!

  2. #2
    Frenzied Member
    Join Date
    Aug 2009
    Location
    Los Angeles
    Posts
    1,335

    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

  3. #3
    Frenzied Member IanRyder's Avatar
    Join Date
    Jan 2013
    Location
    Healing, UK
    Posts
    1,232

    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.

  4. #4

    Thread Starter
    Member
    Join Date
    Jan 2013
    Posts
    50

    Re: Text Box Question

    Thank you!!!

  5. #5
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    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
  •  



Click Here to Expand Forum to Full Width