By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,678 Members | 1,146 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,678 IT Pros & Developers. It's quick & easy.

How to select all in Textbox?

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
textbox.SelectAll

Nov 21 '05 #2

P: n/a
"Brett" <no@spam.com> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
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
Nov 21 '05 #4

P: n/a

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
"Brett" <no@spam.com> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


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

Thanks,
Brett
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.