Home All Groups Group Topic Archive Search About

how to avoid atomatic selection of text in textbox?

Author
30 Oct 2007 6:17 PM
Stephan Elsner
I want to output text in a multiline scrollable read only textbox, but
the text is always selected which look strange and is hard to read.

How can I deselect the text programatically?

Author
30 Oct 2007 9:29 PM
Herfried K. Wagner [MVP]
"Stephan Elsner" <el***@web.de> schrieb:
>I want to output text in a multiline scrollable read only textbox, but
> the text is always selected which look strange and is hard to read.
>
> How can I deselect the text programatically?

Take a look at the control's parameterized 'Select' method and its
'SelectionStart' and 'SelectionLength' properties.

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

AddThis Social Bookmark Button