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.
 

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

Back
Top