• 0

[VB .NET] UserControl Item Collection


Question

I am still pretty new to VB.NET. I am trying to build a user control that incorporates an items list.

Public Class MyClass
		 Private dataList As System.Collections.ArrayList = New System.Collections.ArrayList()

		 Public Property DataItems() As System.Collections.ArrayList
		 Get
			Return dataList
		 End Get
		 Set(ByVal value As System.Collections.ArrayList)
			dataList = value
		 End Set
		 End Property
End Class

Now when I drag my control into another project and try to edit its Items properties, I can only add items of type System.Object. The title of the dialog box used for adding the items says "Object Collection Editor" instead of "String Collection Editor". I want to be able to add items through design mode. Thanks

Link to comment
https://www.neowin.net/forum/topic/545331-vb-net-usercontrol-item-collection/
Share on other sites

2 answers to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.