Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

[RESOLVED] Check if list has been modified

$
0
0
I'm trying to basically make a FlowLayoutPanel only accept a custom control that I've created that inherits a Button. So I've Shadowed the Controls property and I've created my own property, but instead of declaring it as a ControlsCollection, I've declared it as a list<of my class>:
Code:

    Public Shadows ReadOnly Property Controls() As ControlCollection
        Get
            Return MyBase.Controls
        End Get
    End Property

    Private itms As New List(Of MenuItem)
    Public Property Items() As List(Of MenuItem)
        Get
            Return itms
        End Get
        Set(value As List(Of MenuItem))
            itms = value
        End Set
    End Property

What I'm stumped at is how check if the Items() property has been modified, that away I can call something like:
Code:

Me.Controls.Clear : Me.Controls.AddRange(itms.ToArray())

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>