PropertyGrid Filtering

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi !

I have an object with Font property, but i don't need all Font's properties. How can i show just some Font properties in PropertyGrid(like font name & size) ?

Thanks
 
If you want only those 2 fields in font, you can introduce your own
properties saying "FontName" and "FontSize". Introduce StringConverters and
fill comboboxes using FontFamily class.

--
Shak
(Houston)


rocco said:
Hi !

I have an object with Font property, but i don't need all Font's
properties. How can i show just some Font properties in PropertyGrid(like
font name & size) ?
 
Is there any other way to hide certain properties of an object in PropertyGrid? Problem with Font objects is because it's properties can't be overriden, because Font class cant't be inherited.
 
search for ICustomTypeDescriptor in MSDN. That will solve your
customization

--
Shak
(Houston)


rocco said:
Is there any other way to hide certain properties of an object in
PropertyGrid? Problem with Font objects is because it's properties can't be
overriden, because Font class cant't be inherited.
 
Back
Top