|
From: tony on 29 Jun 2008 18:36 Hi, I want to prevent the user, from selecting text (blue selection) in TextBox , How can i do this ? (the textbox must be enabled=true) Thanking in advance.
From: "Paul G. Tobey [eMVP]" p space tobey no spam AT no instrument no spam DOT on 30 Jun 2008 11:46 Why must it be enabled, but not selectable? Tell us *what* you are trying to do, *not* how you've decided to do it. We can give you a good answer that way. Paul T. "tony" <daylor(a)netvision.net.il> wrote in message news:g492me$ejn$1(a)news4.netvision.net.il... > Hi, > > I want to prevent the user, from selecting text (blue selection) in > TextBox , How can i do this ? > > (the textbox must be enabled=true) > Thanking in advance. >
From: Simon Hart [MVP] on 1 Jul 2008 02:50 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 Hart Visual Developer - Device Application Development MVP http://simonrhart.blogspot.com "tony" wrote: > Hi, > > I want to prevent the user, from selecting text (blue selection) in TextBox > , How can i do this ? > > (the textbox must be enabled=true) > Thanking in advance. > > >
From: tony on 1 Jul 2008 04:41 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.K 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 news:%23Rel6hs2IHA.548(a)TK2MSFTNGP06.phx.gbl... > Why must it be enabled, but not selectable? Tell us *what* you are trying > to do, *not* how you've decided to do it. We can give you a good answer > that way. > > Paul T. > > "tony" <daylor(a)netvision.net.il> wrote in message > news:g492me$ejn$1(a)news4.netvision.net.il... >> Hi, >> >> I want to prevent the user, from selecting text (blue selection) in >> TextBox , How can i do this ? >> >> (the textbox must be enabled=true) >> Thanking in advance. >> > >
From: "Paul G. Tobey [eMVP]" p space tobey no spam AT no instrument no spam DOT on 1 Jul 2008 10:57 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. "tony" <daylor(a)netvision.net.il> wrote in message news:g4cqfs$sr8$1(a)news4.netvision.net.il... > > 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.K > > 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 news:%23Rel6hs2IHA.548(a)TK2MSFTNGP06.phx.gbl... >> Why must it be enabled, but not selectable? Tell us *what* you are >> trying to do, *not* how you've decided to do it. We can give you a good >> answer that way. >> >> Paul T. >> >> "tony" <daylor(a)netvision.net.il> wrote in message >> news:g492me$ejn$1(a)news4.netvision.net.il... >>> Hi, >>> >>> I want to prevent the user, from selecting text (blue selection) in >>> TextBox , How can i do this ? >>> >>> (the textbox must be enabled=true) >>> Thanking in advance. >>> >> >> > >
|
Pages: 1 Prev: How to get current ringtone name ? Next: PocketPC 2003 on WinCE .net 5.0 |