APaule Posted April 30, 2003 Posted April 30, 2003 I would like to add a property for an inherited control in order to be displayed in the property window during design-time. In my example it is a simple boolean property. I know that I have to use a Designer and that I need the PreFilterProperties method. But thats it. So, can anyone help me please, to solve that problem. Quote
*Experts* Nerseus Posted April 30, 2003 *Experts* Posted April 30, 2003 Actually, I've added properties to inherited controls and they show up automatically in the properties window (A bool property has the usual True/False choices). Just make sure your property is public. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
APaule Posted May 1, 2003 Author Posted May 1, 2003 Hey thx, that's right!!! I did not check this, because I was after the solution for the Control Designer. So what is the PreFilterProperties method for, when added properties are added to the Properties Window anyway? Quote
*Gurus* divil Posted May 1, 2003 *Gurus* Posted May 1, 2003 That method allows you to add properties to the object you are designing, from the designer. In other words, design-time only properties. 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
APaule Posted May 2, 2003 Author Posted May 2, 2003 Can you give an example, please. Because I have no idea at the moment what properties I could use at design-time only. Quote
*Gurus* divil Posted May 2, 2003 *Gurus* Posted May 2, 2003 It's very uncommon, and I can't think of many examples. One is the designers adding a GridSize property to things like Panels though. 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
APaule Posted May 2, 2003 Author Posted May 2, 2003 ok, thx. I think uncommon is the right expression.:) Quote
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.