M
marcotrapanese
Hello!
I wrote a class "Layers" with one event "DataChanged":
Public Class Layers
Private _Value as Object
Public Property Value() As Object
Get
Return _Value
End Get
Set(ByVal value As Object)
_Value = value
RaiseEvent DataChanged()
End Set
End Property
Public Event DataChanged()
End Class
I use it into another class:
Public Class Gauge
Private WithEvents _Layer As New List(Of Layers)
Public Property Layer() As List(Of Layers)
Get
Return _Layer
End Get
Set(ByVal value As List(Of Layers))
_Layer = value
End Set
End Property
Private Sub _DataChanged() Handles _Layer. <------- I'd
like .DataChanged
Draw()
End Sub
End Class
I'd like to handle in _DataChanged() the DataChanged event raised by
any Layer class into _Layer list.
But VB hide me the event after Hanldes _Layer.
Why? How may I fix this?
Note: if I declare _Layer as new Layers (without the List(Of ...)) all
works fine.
Thank you
Marco / iw2nzm
I wrote a class "Layers" with one event "DataChanged":
Public Class Layers
Private _Value as Object
Public Property Value() As Object
Get
Return _Value
End Get
Set(ByVal value As Object)
_Value = value
RaiseEvent DataChanged()
End Set
End Property
Public Event DataChanged()
End Class
I use it into another class:
Public Class Gauge
Private WithEvents _Layer As New List(Of Layers)
Public Property Layer() As List(Of Layers)
Get
Return _Layer
End Get
Set(ByVal value As List(Of Layers))
_Layer = value
End Set
End Property
Private Sub _DataChanged() Handles _Layer. <------- I'd
like .DataChanged
Draw()
End Sub
End Class
I'd like to handle in _DataChanged() the DataChanged event raised by
any Layer class into _Layer list.
But VB hide me the event after Hanldes _Layer.
Why? How may I fix this?
Note: if I declare _Layer as new Layers (without the List(Of ...)) all
works fine.
Thank you
Marco / iw2nzm