ballisticnylon Posted May 17, 2008 Posted May 17, 2008 Hi there everybody, Today I was playing around with the Flow Layout Panel control (it's a panel that governs the layout of the controls it contains, moving their locations so controls don't overlap). Anyway, any control that is added to a Flow Layout Panel gets a new property, FlowBreak. I've noticed that this property is settable in the Property Grid in the designer, but not in code. I guess my (very general) question is, what's going on here? How does a parent control add a property to its' children, is it a real property that belongs to the child, and finally (and most importantly) how can I write a container control that does the same thing? Thanks in advance, people. This stuff is confusing. bn Quote "It may be roundly asserted that human ingenuity cannot concoct a cipher which human ingenuity cannot resolve." - Edgar Allan Poe, 1841 I long to accomplish great and noble tasks, but it is my chief duty to accomplish humble tasks as though they were great and noble. The world is moved along, not only by the mighty shoves of its heroes, but also by the aggregate of the tiny pushes of each honest worker. - Helen Keller
MrPaul Posted May 17, 2008 Posted May 17, 2008 IExtenderProvider The IExtenderProvider interface allows properties to be added to existing controls. The following post demonstrates how this can be used to add an ImageIndex property to MenuItem components, which is then used to associate an icon with the menu item. Extend your Menus with IExtenderProvider Good luck :cool: Quote Never trouble another for what you can do for yourself.
ballisticnylon Posted May 17, 2008 Author Posted May 17, 2008 Re: IExtenderProvider Ah, great. Thanks. Quote "It may be roundly asserted that human ingenuity cannot concoct a cipher which human ingenuity cannot resolve." - Edgar Allan Poe, 1841 I long to accomplish great and noble tasks, but it is my chief duty to accomplish humble tasks as though they were great and noble. The world is moved along, not only by the mighty shoves of its heroes, but also by the aggregate of the tiny pushes of each honest worker. - Helen Keller
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.