Hi
TextBox.ReadOnly stii won't work. At least for multiline textboxes.
I am using CF3.5 on a Windows Mobile 6.1 system.
I will try PrTaS's solution.
PrTaS wrote:
How to prevent SELECTION by user, in TEXTBOX ?
28-Jul-08
I also could not imagine why it does not work but you may try this
private void textBox_KeyPress(object sender, KeyPressEventArgs e
e.Handled = true
}
Previous Posts In This Thread:
How to prevent SELECTION by user, in TEXTBOX ?
Hi
I want to prevent the user, from selecting text (blue selection) in TextBo
, How can i do this
(the textbox must be enabled=true
Thanking in advance.
Why must it be enabled, but not selectable?
Why must it be enabled, but not selectable? Tell us *what* you are tryin
to do, *not* how you have decided to do it. We can give you a good answe
that way
Paul T.
This sounds quite ugly.
This sounds quite ugly. But if you'd really need to do it, you'd have to
implement the OnMouseUp event check the selected text and set it to zero if
its greater than 0 - ugly but will work
--
Simon Har
Visual Developer - Device Application Development MV
http://simonrhart.blogspot.co
:
Hi,The problem is I created custom textbox ,I want to prevent the user to
Hi
The problem is I created custom textbox
I want to prevent the user to change the text
For some reason the Text.ReadOnly did not prevent the user to write text in
the TextBox
so i create custom read only that will return immedialy from Key events
till here everything was O.
but then, i notice that if i select the text and then write somthing, the
text is changed, although i had the custom readonly=true
Thanking in advance
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message
So, the problem is that ReadOnly isn't working, NOT THAT YOU NEED TO PREVENT
So, the problem is that ReadOnly isn't working, NOT THAT YOU NEED TO PREVENT
SELECTION OF TEXT! Give us the details on your environment. You haven't
told us what the target device is (Windows Mobile? Windows CE? Version?),
what version of .NET Compact Framework you are working with, etc. It might
be worthwhile to build a simple custom textbox that demonstrates the
problem, verify that it exists in that case, and post the code. Can we
presume, also, that regular Textbox controls *do* work correctly with
respect to ReadOnly for you? I can't find any situations where ReadOnly
doesn't work
Paul T
How to prevent SELECTION by user, in TEXTBOX ?
I also could not imagine why it does not work but you may try this
private void textBox_KeyPress(object sender, KeyPressEventArgs e
e.Handled = true
}
Submitted via EggHeadCafe - Software Developer Portal of Choice
Join Lists with LINQ - SharePoint 2010
http://www.eggheadcafe.com/tutorial...6e-7d3fb7d38eca/join-lists-with-linq--sh.aspx