PC Review


Reply
Thread Tools Rate Thread

Changing backcolor of read-only textbox.

 
 
=?Utf-8?B?am9jaG9h?=
Guest
Posts: n/a
 
      5th Mar 2004
Hello all, I have a question. Is there an easy way (not doing custom control) to change de default (or do it manually) backcolor of a read-only textbox?? Because it paints a ugly gray although you change the backcolor

Thanks in advance

Jorge Ochoa.
 
Reply With Quote
 
 
 
 
Boris Nienke
Guest
Posts: n/a
 
      5th Mar 2004
On Fri, 5 Mar 2004 01:41:08 -0800, jochoa wrote:

> Hello all, I have a question. Is there an easy way (not doing custom
> control) to change de default (or do it manually) backcolor of a
> read-only textbox?? Because it paints a ugly gray although you change
> the backcolor.


i don't think so - this is a problem on PC too

you can maybe work-around that problem:
1.) making it NOT readonly
2.) place an event-handler for the Keydown, keyup, keypress and simply
catch all key-events (set e.handled = true)

now you can focus in that control but can't type anything... maybe that
will work for you?

Boris
 
Reply With Quote
 
=?Utf-8?B?am9jaG9h?=
Guest
Posts: n/a
 
      8th Mar 2004
Thanks Boris

it is not a clean solution, but It may works.

Thanks

Jorge Ochoa.
 
Reply With Quote
 
Boris Nienke
Guest
Posts: n/a
 
      8th Mar 2004
On Mon, 8 Mar 2004 01:21:06 -0800, jochoa wrote:

> Thanks Boris,
>
> it is not a clean solution,


of course not - that's why i called it a "work-around" ;-)

good luck

Boris
 
Reply With Quote
 
Ryan Chapman [MSFT]
Guest
Posts: n/a
 
      8th Mar 2004
Hi All,

You can work around this on the desktop by manually changing the background
color (to something else then back to Window). Unfortunately this doesn't
work with NETCF. You may be able to get the desired effect with a label,
though.

Thanks,

Ryan Chapman
Software Development Engineer
..NET Compact Framework

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Maarten Struys, eMVP
Guest
Posts: n/a
 
      8th Mar 2004
Although unfortunately a label is not really an alternative when you need
horizontal scrolling.

--
Regards,

Maarten Struys, eMVP
PTS Software bv

www.opennetcf.org | www.dotnetfordevices.com

"Ryan Chapman [MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> You can work around this on the desktop by manually changing the

background
> color (to something else then back to Window). Unfortunately this doesn't
> work with NETCF. You may be able to get the desired effect with a label,
> though.
>
> Thanks,
>
> Ryan Chapman
> Software Development Engineer
> NET Compact Framework
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
textbox backcolor =?Utf-8?B?V2FjaHM=?= Microsoft Access Form Coding 1 24th Jun 2007 12:40 AM
textbox backcolor bug? Harry Simpson Microsoft Dot NET Compact Framework 5 6th Sep 2006 02:00 AM
Changing BackColor of a textbox using Event Procedures =?Utf-8?B?Zm5ld2VsbA==?= Microsoft Access Form Coding 1 20th May 2005 07:57 PM
Changing TextBox BackColor / ForeColor When Disabled Steve Le Monnier Microsoft C# .NET 3 3rd Mar 2005 02:53 PM
Changing the BackColor of a label, box or textbox via code Alp Bekisoglu Microsoft Access Reports 3 30th May 2004 08:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:08 PM.