BrowsableAttributes Takes Only One Value

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

Guest

I am trying to set the PropertyGrid. BrowsableAttributes to multiple values
of CategoryAttribute but if I use more then one no properties are displayed.
Code below--
Attribute filterattribute1=new CategoryAttribute("TestJ1");
Attribute filterattribute2=new CategoryAttribute("TestJ2");
propertyGrid1.BrowsableAttributes=new AttributeCollection(new Attribute[] {
new CategoryAttribute("Appearance"),
new CategoryAttribute("Layout")});
propertyGrid1.SelectedObject=this;
propertyGrid1.Refresh();

I have seen other references to this problem on the web.

Is there a solution or workaround for this problem?

Thanks.
 
I suspect you would have to write your own property-grid tab from
scratch and override the method that gets the properties (probably
GetProperties(), I can't recall exactly). There are examples of
writing a property-grid tab on MSDN.

Marc
 

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