Changing backcolor of read-only textbox.

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
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.
 
Back
Top