MadMaxMSCN Posted October 1, 2004 Posted October 1, 2004 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? <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. Quote
*Gurus* divil Posted October 1, 2004 *Gurus* Posted October 1, 2004 The easiest way would be to derive from those classes in question, override the properties in question and apply the BrowsableAttribute to them. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
MadMaxMSCN Posted October 1, 2004 Author Posted October 1, 2004 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. Quote
*Gurus* divil Posted October 5, 2004 *Gurus* Posted October 5, 2004 I suggest you go on using your third-party control then. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.