kimosavi
Active member
Hi,
I want to be able to create my own list of of listviewitems by adding my own properties and variables. I tried the Override but it doesn' work, only the Overloads or Shadows seems to be working.
so far i have done this:
Public Class modListView
Inherits ListView
Private modList As ModListViewItemCollection
Public Overloads ReadOnly Property Items() As ModListViewItemCollection
Get
Return modList
End Get
End Property
End Class
Public Class ModListViewItemCollection
Inherits modListView.ListViewItemCollection
Sub New()
MyBase.New(New modListView)
End Sub
End Class
Public Class ModListViewItem
Inherits ListViewItem
Public Var1 As String
Public Var2 As String
Public Var3 As String
Public Property1 as String
Public Property2 as String
Public Property3 as String
End Class
I was able to add these controls to the GUI. my ModListView is using a ImageList called myImages and contains 4 images. I did the connection in the designer window.
I my new ModListView I can go to the properties and I can see the ITEMS property now classified under MISC. when I click [...] I can add ViewListItems but for some reason when I click on the ImageIndex Property I there is no items there to select the image.
What am I doing wrong?
I also tried to following without success:
Public Class modListView
Inherits ListView
Private modList As New List(Of ModListViewItems)
Public Shadows ReadOnly Property Items() As List(Of ModListViewItems)
Get
Return modList
End Get
End Property
End Class
Public Class ModListViewItem
Inherits ListViewItem
Public Var1 As String
Public Var2 As String
Public Var3 As String
Public Property1 as String
Public Property2 as String
Public Property3 as String
End Class
I want to be able to create my own list of of listviewitems by adding my own properties and variables. I tried the Override but it doesn' work, only the Overloads or Shadows seems to be working.
so far i have done this:
Public Class modListView
Inherits ListView
Private modList As ModListViewItemCollection
Public Overloads ReadOnly Property Items() As ModListViewItemCollection
Get
Return modList
End Get
End Property
End Class
Public Class ModListViewItemCollection
Inherits modListView.ListViewItemCollection
Sub New()
MyBase.New(New modListView)
End Sub
End Class
Public Class ModListViewItem
Inherits ListViewItem
Public Var1 As String
Public Var2 As String
Public Var3 As String
Public Property1 as String
Public Property2 as String
Public Property3 as String
End Class
I was able to add these controls to the GUI. my ModListView is using a ImageList called myImages and contains 4 images. I did the connection in the designer window.
I my new ModListView I can go to the properties and I can see the ITEMS property now classified under MISC. when I click [...] I can add ViewListItems but for some reason when I click on the ImageIndex Property I there is no items there to select the image.
What am I doing wrong?
I also tried to following without success:
Public Class modListView
Inherits ListView
Private modList As New List(Of ModListViewItems)
Public Shadows ReadOnly Property Items() As List(Of ModListViewItems)
Get
Return modList
End Get
End Property
End Class
Public Class ModListViewItem
Inherits ListViewItem
Public Var1 As String
Public Var2 As String
Public Var3 As String
Public Property1 as String
Public Property2 as String
Public Property3 as String
End Class