Inherits Collection

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi all :
Can I
Inherits GridColumnStylesCollection
if yes, and how to write it ?

Thanks
 
But it show error while

it say :
Class MyGridColumnStylesCollection must declare a 'Sub New' because its base
class 'GridColumnStylesCollection' does not have an accessible 'Sub New'
that can be called with no arguments.

how to fix it ?

Thanks
 
Actually :

I want to create the user control as follow :


Public Class LookAndView
Inherits System.Windows.Forms.UserControl
Private _Collection As GridTableStylesCollection


Public Property Styles() As
System.Windows.Forms.GridTableStylesCollection
Get
Return _Collection
End Get
Set(ByVal Value As System.Windows.Forms.GridTableStylesCollection)
_Collection = Value
End Set
End Property
emd class

I want the properties Styles can edit in style collection editor during in
design mode. However, I find there some problem :
1. Styles property show empty / nothing (I know the normal case is show
collection)
2. When I click new in style collection editor and input some value into
properites. And then I click ok. During open the style collection editor.
the member side still nothing.


Can u help me to solve this problem ?

Thanks
 
Michael,
Can u help me to solve this problem ?
No, because apples is not a collection of pears.

(I don't see what the styles has to do with a usercontrol and how you could
use that)

Cor
 
Ok. Thanks

I try to use another method.
Another question is how to create simple custom collection editor for
usercontrol . any simple sample for me as reference ?

Thanks
 
Michael said:
But it show error while

it say :
Class MyGridColumnStylesCollection must declare a 'Sub New' because its
base class 'GridColumnStylesCollection' does not have an accessible 'Sub
New' that can be called with no arguments.

You cannot inherit from this class because its base class doesn't have a
constructur which is accessible from the derived class.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top