Code:
Public Class QVW
Inherits System.Windows.Forms.ListView
I am trying to save myself some time by creating a new control that wraps the windows listview control. I would like for this control to offer all the functionality of the listview, but with a few extra methods and properties.
The problem is that the methods and properties that I am adding make use of the built-in functionality of listview, and in my class the only methods and properties that are available for "QVW" are those that are 'shared' or 'class'.
What's the best way to do this? As an example (just to demonstrate what I want to do), let's say that I want to make a method that will add a column. My code might look something like this:
Code:
Private Sub MakeColumn()
QVW.ColumnHeaderCollection.Add("ExtraColumn")
End Sub
But VS is giving me the following error:
Reference to a non-shared member requires an object reference
I understand the error, but I feel like this is a pretty common thing to do in OOP and so I'm hoping one of you guys can tell me how this is typically handled.
Thanks.
-Brad