zildjohn01 Posted April 23, 2005 Posted April 23, 2005 hi all, i have a question about inheritance of windows forms controls. is there any way to inherit from 'Control' and add functionality that all controls will have? For example if I inherit from 'Control' and add MyMember, is there any way to have a text box include MyMember also? So far I have been inheriting from every Windows Forms control and adding the same functionality, it seems there may be an easier way... Many thanks in advance for an answer. Quote
Administrators PlausiblyDamp Posted April 23, 2005 Administrators Posted April 23, 2005 There is no way to extend the existing base classes in that way - you couldn't simply get the existing controls to inherit from your base class. However you may want to look at the IExtenderProvider interface - this will allow you to add additional functionality to controls at design time e.g. the tooltip component. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
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.