|
-
July 21st, 2009, 09:23 AM
#1
Custom inheritance
Hi from what I understand, the built-in System.Windows.Forms.Label class inherits from the System.Windows.Forms.Control class. Is there any way to change the Form.Label class' inheritance to a custom (SectionControl) class which is derived from the Forms.Control class?
so basically,
class SectionControl : Control
class MyLabel : Label
but override/replace the existing implict ‘System.Windows.Forms.Label : Control’ inheritance to ‘System.Windows.Forms.Label : SectionControl’. That way I get the benefits from both the SectionControl and MyLabel specializations. If this is possible I would proceed to add a MyTextBox, MyCheckBox, etc... classes also deriving from the obvious parent and thereby retaining the commonality of all the custom controls in the SectionControl class.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|