PropertyGrid and Color

C

Chris Dunaway

I am using a PropertyGrid control to display the properties of a class.
All of the properties of this class are ReadOnly and are set only in the
constructor.

When the PropertyGrid is displayed, the properties are shown 'greyed out'
because they are read only. I want them to display normally but still be
read only. In other words I want them to display as Black regardless of
whether or not they are read only.

Can this be done?
 
J

Javier Campos

Chris Dunaway said:
I am using a PropertyGrid control to display the properties of a class.
All of the properties of this class are ReadOnly and are set only in the
constructor.

When the PropertyGrid is displayed, the properties are shown 'greyed out'
because they are read only. I want them to display normally but still be
read only. In other words I want them to display as Black regardless of
whether or not they are read only.

Can this be done?

The only way I can think of, is removing the ReadOnly attribute (or setting
it to false), and make a setter that does nothing (not sure if it'll assume
ReadOnly if there's no setter).

Hope this helps,

Javier Campos
 

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