How to select all in Textbox?

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

I have a textbox with a heigth of 384. I put a lot of text into it and must
scroll down to see it all. When I do Ctrl + A, it doesn't highlight all of
the text. I have to manually drag my mouse to get the text. Is there a way
to engage the select all?

Thanks,
Brett
 
Brett said:
I have a textbox with a heigth of 384. I put a lot of text into it and
must scroll down to see it all. When I do Ctrl + A, it doesn't highlight
all of the text. I have to manually drag my mouse to get the text. Is
there a way to engage the select all?

Are you referring to programmatically selecting the text or the user
selecting the text? At runtime you can select the whole text by calling the
textbox' 'SelectAll' method.
 
Brett,

I remember seeing a similar query on this list, so you might want to check
it out. But here is a code snippet that selects all the text in a textbox and
assigns it to a string var.

///
Dim str As String
TextBox1.SelectAll()
str = TextBox1.SelectedText
\\\

HTH
 
Herfried K. Wagner said:
Are you referring to programmatically selecting the text or the user
selecting the text? At runtime you can select the whole text by calling
the textbox' 'SelectAll' method.

I don't mean programmatically. I mentioned Ctrl + A, which is keyboard
access.

Thanks,
Brett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top