Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing backcolor of read-only textbox.

143 views
Skip to first unread message

Boris Nienke

unread,
Mar 5, 2004, 6:18:06 AM3/5/04
to
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

jochoa

unread,
Mar 8, 2004, 4:21:06 AM3/8/04
to
Thanks Boris,

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

Thanks.

Jorge Ochoa.

Boris Nienke

unread,
Mar 8, 2004, 9:33:34 AM3/8/04
to
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

Ryan Chapman [MSFT]

unread,
Mar 8, 2004, 4:15:53 PM3/8/04
to
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.

Maarten Struys, eMVP

unread,
Mar 8, 2004, 6:03:11 PM3/8/04
to
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]" <rya...@online.microsoft.com> wrote in message
news:tIFFHKVB...@cpmsftngxa06.phx.gbl...


> 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

dvhung...@gmail.com

unread,
Mar 29, 2013, 1:07:50 PM3/29/13
to
but when i type 'del' it not work :(
0 new messages