Property Grid: Don't show all Properties

MadMaxMSCN

Newcomer
Joined
Aug 18, 2004
Messages
23
Location
Bavaria, Germany
Hi

I want to use a PropertyGrid in my application to change some properties of some controls in my application at runtime.

Is there a way to hide some properties so you can't edit it? The Enabled, the Visible and some other properties should'nt be shown in the PropertyGrid.

How can I do this?

Code:
<BrowsableAttribute(False)> _    
Public Property ...
would work if I would use my own class to show its properties. But I can't use this for Buttons, Labels and so on because I can't modify their code.
 
The easiest way would be to derive from those classes in question, override the properties in question and apply the BrowsableAttribute to them.
 
Thanks for your answer. But that's much too much work.
I need this for a upgrade from vb6 to vb.net

In vb6 AxPropList was used. If it's not too much work i want to change to PropertyGrid.

It seems to be much less work upgrading AxPropList usage to .net than changing to PropertyGrid.
 
Back
Top