PropertyGrid and Color

  • Thread starter Thread starter Chris Dunaway
  • Start date Start date
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?
 
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
 
Back
Top