Yes. I do have an AddRange in MyColumnHeaderCollection. It just called
joeycalisay wrote:
> Do you have an AddRange method in your MyColumnHeaderCollection?
>
> --
> Joey Calisay
>
http://spaces.msn.com/members/joeycalisay/ >
>
> <jrhoads23@hotmail.com> wrote in message
> news:1114790869.191764.130780@f14g2000cwb.googlegroups.com...
> I have a custom list view "MyListView" (inherited from
> System.Windows.Forms.ListView) which has a "Columns" property.
> "Columns" if of type "MyColumnHeaderCollection" which is inherited from
>
> System.Windows.Forms.ListView.=ADColumnHeaderCollection.
> MyColumnHeaderCollection is a collection of "MyColumnHeader" objects
> which are inherited from System.Windows.Forms.ColumnHea=ADder.
>
>
> I can go in the and add an instance of MyListView to a form and add
> columns to it. In the InitializeComponent call, the List View is
> created with the correct type (MyListView), the individual columns are
> created with the correct type (MyColumnHeader), but the AddRange call
> defines the columns as System.Windows.Forms.ColumnHea=ADder() and not
> MyColumnHeader().
>
>
> What am I doing wrong or missing to get the AddRange call to use the
> correct type???
>
>
> Below is a snip from the automatically generated InitializeComponent
> function...
>
>
> <System.Diagnostics.DebuggerSt=ADepThrough()> Private Sub
> InitializeComponent()
> Me.ListView1 =3D New MyListView
> Me.ColumnHeader1 =3D New MyColumnHeader
> Me.ColumnHeader2 =3D New MyColumnHeader
> '
> 'ListView1
> '
> Me.ListView1.Columns.AddRange(=ADNew
> System.Windows.Forms.ColumnHea=ADder()
> {Me.ColumnHeader1, Me.ColumnHeader2})
> Me.ListView1.Location =3D New System.Drawing.Point(100, 200)
> Me.ListView1.Name =3D "ListView1"
> Me.ListView1.TabIndex =3D 5
> End Sub