J
Jeannot
I have a few types of panels (each with different controls), which I
will create dynamically and place on a form.
I can make them UserControls if I need to.
However I would like to have a base class for these, so that I have a
class hierarchy like:
System.Windows.Forms.Panel
|
|
MyBasePanelClassWithOverridableMethods
| |
| |
MyPanelType1 MyPanelType2
I tried to create a UserControl and inserted a base class within
Notepad, changing:
----------------------
Partial Class UserControl1
Inherits System.Windows.Forms.UserControl
---------------------
To:
----------------------
Partial Class MyBaseUserControl
Inherits System.Windows.Forms.UserControl
End Class
Partial Class UserControl1
Inherits Class MyBaseUserControl
------------------------
....and DevStudio2008 gives me an error "Value does not fall within
expected range", which is useless.
Is there something more I need to do to insert my base class?
Is there another way to achieve what I need to achieve? I need
MyPanelType1 and MyPanelType2 to be editable as far as contained
controls, etc...
Thanks!
will create dynamically and place on a form.
I can make them UserControls if I need to.
However I would like to have a base class for these, so that I have a
class hierarchy like:
System.Windows.Forms.Panel
|
|
MyBasePanelClassWithOverridableMethods
| |
| |
MyPanelType1 MyPanelType2
I tried to create a UserControl and inserted a base class within
Notepad, changing:
----------------------
Partial Class UserControl1
Inherits System.Windows.Forms.UserControl
---------------------
To:
----------------------
Partial Class MyBaseUserControl
Inherits System.Windows.Forms.UserControl
End Class
Partial Class UserControl1
Inherits Class MyBaseUserControl
------------------------
....and DevStudio2008 gives me an error "Value does not fall within
expected range", which is useless.
Is there something more I need to do to insert my base class?
Is there another way to achieve what I need to achieve? I need
MyPanelType1 and MyPanelType2 to be editable as far as contained
controls, etc...
Thanks!