N
Noozer
Trying to specify a single public property on my user control to hold three
different images. I figure out how to do this and Google searches are not
helping. (I probably am not searching on the right terms.)
My sample below is using an array of images, but I cannot specify more than
one parameter in the SET statement. I'm not sure how I'd change this to use
a collection of images.
....
Private iImages(2) as image 'Holds three images
....
'Set/Return image for particular state
Public Property image(ByVal index As Integer) As image
Get
Return iImages(index)
End Get
Set(ByVal index as Integer, ByVal Value As image) '<---Doesn't work. How
do I specify an index
iImages(index) = Value
If iIndex = index Then 'If changing image for currently displayed image,
apply it to display
picImage.Image = Value
End If
End Set
End Property
different images. I figure out how to do this and Google searches are not
helping. (I probably am not searching on the right terms.)
My sample below is using an array of images, but I cannot specify more than
one parameter in the SET statement. I'm not sure how I'd change this to use
a collection of images.
....
Private iImages(2) as image 'Holds three images
....
'Set/Return image for particular state
Public Property image(ByVal index As Integer) As image
Get
Return iImages(index)
End Get
Set(ByVal index as Integer, ByVal Value As image) '<---Doesn't work. How
do I specify an index
iImages(index) = Value
If iIndex = index Then 'If changing image for currently displayed image,
apply it to display
picImage.Image = Value
End If
End Set
End Property