Home > Archive > C# > September 2005 > how do i make text field not select text?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
how do i make text field not select text?
|
|
| worzel 2005-09-07, 3:57 am |
| Hi Guys
Here's the issue, I have a form which pops up after the click of a button in
a main form. The 'popped up' form has a text filed which is pre-filled with
some text. However, each time the form is 'popped up' the text in this field
is automatcally highlighted (selected). How do i prevent this from
happening?
I have played around with the focus() method to no avail.
TIA.
| |
| Jan Bannister 2005-09-07, 7:57 am |
| It's the first control in the tab order of you form, you could try:
changing the tab order,
setting TabStop = false on the textbox
on Load() setting selectedText = string.empty
Hope that helps,
Jan
| |
| Jan Bannister 2005-09-07, 7:57 am |
| By the way, That was three *different* things you could do.
when I re-read what i posted, it wasn't clear..
Jan
| |
| worzel 2005-09-07, 6:59 pm |
| cheers - the tab order did the trick! Nice and easy!
"Jan Bannister" <jan.bannister@gmail.com> wrote in message
news:1126092489.797904.99840@f14g2000cwb.googlegroups.com...
> It's the first control in the tab order of you form, you could try:
> changing the tab order,
> setting TabStop = false on the textbox
> on Load() setting selectedText = string.empty
>
> Hope that helps,
> Jan
>
|
|
|
|
|