N
nobody
If I've got a property on my web control that is a collection (of strings),
how can I have it allow the user to edit those strings through the property
window at design time?
The property on my webcontrol is defined as:
Private WithEvents m_Choices As ChoiceList
Property Choices() As ChoiceList
Get
Return m_Choices
End Get
Set(ByVal Value As ChoiceList)
m_Choices = Value
End Set
End Property
ChoiceList is defined as:
Public Class ChoiceList
Implements IEnumerable
Implements IEnumerator
Private m_Choices As New ArrayList
Private m_CurChoice As Integer
Public Event ChoicesChanged()
Public Sub New()
Me.Clear()
End Sub
Public Sub Clear()
Me.Reset()
m_Choices.Clear()
RaiseEvent ChoicesChanged()
End Sub
Public Function Add(ByVal Choice As String) As Integer
Dim Value As Integer
Value = m_Choices.Add(Choice)
RaiseEvent ChoicesChanged()
Return Value
End Function
...
End Class
Do I have to implement IList? The whole point of the class is to make the
collection typesafe. IList users Object which lets the user pass anything
in.
how can I have it allow the user to edit those strings through the property
window at design time?
The property on my webcontrol is defined as:
Private WithEvents m_Choices As ChoiceList
Property Choices() As ChoiceList
Get
Return m_Choices
End Get
Set(ByVal Value As ChoiceList)
m_Choices = Value
End Set
End Property
ChoiceList is defined as:
Public Class ChoiceList
Implements IEnumerable
Implements IEnumerator
Private m_Choices As New ArrayList
Private m_CurChoice As Integer
Public Event ChoicesChanged()
Public Sub New()
Me.Clear()
End Sub
Public Sub Clear()
Me.Reset()
m_Choices.Clear()
RaiseEvent ChoicesChanged()
End Sub
Public Function Add(ByVal Choice As String) As Integer
Dim Value As Integer
Value = m_Choices.Add(Choice)
RaiseEvent ChoicesChanged()
Return Value
End Function
...
End Class
Do I have to implement IList? The whole point of the class is to make the
collection typesafe. IList users Object which lets the user pass anything
in.