Changing backcolor of read-only textbox.

G

Guest

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.
 
B

Boris Nienke

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
 
R

Ryan Chapman [MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top