Windows Control Library

  • Thread starter Thread starter Tim Joyner
  • Start date Start date
T

Tim Joyner

I am trying to create a custom control and I have the need to implement a
collection similar to the Collections that controls like the Listview
control uses (ex. ColumnHeader Collection). I have not found and article
that really explains how this works. Can anyone help me with this or does
anyone know where I can get document that will explain this?


Thanks
 
Hi Tim, if i understand correctly what you're asking, it's pretty simple...

just basically create your windows control library project, in the code view
of the control create a new property of whatever type you'd like ot
implement.

\\\
private m_myCollection as Collections.ArrayList
public property MyCollection as Collections.ArrayList
Get
return m_myCollection
End Get
Set(byval value as Collections.ArrayList)
me.m_myCollection = value
End Set
End Property
///

adding full featured design time support for this property can get a little
tougher, depending on exactly what you'd like to do (support custom
collection etc) but a good place to start is the following page on msdn.

http://tinyurl.com/2aoz6

hope this helps,

jim
 
Thanks

I will try this and see if it works

jim said:
Hi Tim, if i understand correctly what you're asking, it's pretty simple...

just basically create your windows control library project, in the code view
of the control create a new property of whatever type you'd like ot
implement.

\\\
private m_myCollection as Collections.ArrayList
public property MyCollection as Collections.ArrayList
Get
return m_myCollection
End Get
Set(byval value as Collections.ArrayList)
me.m_myCollection = value
End Set
End Property
///

adding full featured design time support for this property can get a little
tougher, depending on exactly what you'd like to do (support custom
collection etc) but a good place to start is the following page on msdn.

http://tinyurl.com/2aoz6

hope this helps,

jim
 
Back
Top