Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have forgotten how to do this and can not find out information on it to save my life. When my user clicks or tabs into a textbox, I want to select (highlight) all of the text in the textbox so that if they start typing, it delete what is in the textbox and put in what they are typing. Anyone have any ideas?

 

Chester

____________________________________________

http://www.pophamcafe.com

I am starting a developers section, more tutorials than anything.

  • *Experts*
Posted

You'll need to set the textbox to the active control when it is entered either by the mouse or tabed.

 

   Private Sub TextBox1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles _
   TextBox1.Enter, TextBox1.MouseEnter
       Me.ActiveControl = Me.TextBox1
   End Sub

 

I think that should get the result you're looking for.

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...