Property Grid Stops Expanding Expandable Properties

H

Howard Swope

I am using the PropertyGrid control. I have altered the BrowsableAttributes
property to a custom attribute. When I do this, expandable properties will
no longer expand in the PropertyGrid. For example, I have a public font
poperty. I can call up the font dialog from the PropertyGrid, but I can't
expand the property to see the font members. If I don't change the
BrowsableAttributes the PropertyGrid behaves normally.

Any ideas?
 
L

Lion Shi

Hello Howard ,

The customized attributes may afftects the functions of PropertyGrid
control. I suggest you remove the customized attributes one by one to
narrow down to the problem attribute. At least it should work when the
collection is empty:

PropertyGrid p = new PropertyGrid();
this.Controls.Add(p);
p.BrowsableAttributes = null;
p.Height = 200;
p.SelectedObject = this;
p.Show();

Hope this helps.

Best regards,

Lion Shi [MSFT]
MCSE, MCSD
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2003 Microsoft Corporation. All rights
reserved.
--------------------
 

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

Top