Mysteries of a font in the PropertyGrid...

  • Thread starter Thread starter Herve Bocuse
  • Start date Start date
H

Herve Bocuse

I would like to know by what mechanism a font displayed in a
PropertyGrid, shows children (like Bold) that correspond to Properties
that only have a get, no set. Is there a special class in the framework
that gives the PropertyGrid the list of rows to display for the font,
and when a new value is entered by the user, the way to modify the
underlying font (since a bold attribute is assigned to the font inside
a FontStyle) ?

Thank you for your help.

Herve
 
Herve Bocuse said:
I would like to know by what mechanism a font displayed in a
PropertyGrid, shows children (like Bold) that correspond to Properties
that only have a get, no set. Is there a special class in the framework
that gives the PropertyGrid the list of rows to display for the font,
and when a new value is entered by the user, the way to modify the
underlying font (since a bold attribute is assigned to the font inside
a FontStyle) ?

Yes, It's called FontConverter, it's a subclass of TypeConverter, which
offers quite a few ways of customising the display of properties in the
PropertyGrid. You use TypeConverterAttribute to associate a TypeConverter
with a type or property.
 
Back
Top