.net - Inheritance of Form -
let me sketch situation. have bunch of forms inheritance implemented.
example:
form - form a1 (inheritance) - form a2 (inheritance) form b - form b1 (inheritance) - form b2 - formb21 (inheritance) - formb22 (inheritance) - form b3 (inheritance) interface 1 - form 1a (implementation) - form 1b (implementation) - form 1c (implementation)
lets presume
the forms a1, a2,b21 & 1a contain field 'authors'
and
forms 1a,1c,b3,a2 contain field named 'origin'.
authors
textbox
, origin
combobox
.
right want group inputcontrole
single superclass (where forms inherit from). how without creating form
forms inherit from?
i've tried let them inherit standard class i've made error somewhere suppose:
public class superclass inherits windows.forms.form public sub new() mybase.new() end sub public overridable sub inputcontroleauthors() public overridable sub inputcontroleorigin() end class
note: wish avoid use of shared
functions well.
any pointers appreciated.
you can define interface contain controls (authors
, origin
in case). implement interface in desired forms accordingly.
Comments
Post a Comment