DataBinding Property question

From: Mika M (mahmik.removethis_at_nospam_luukku.com)
Date: 12/08/04

  • Next message: Serge Shimanovsky: "Bind CheckedListBox to ArrayList of objects"
    Date: Wed, 08 Dec 2004 16:05:15 +0200
    
    

    Hi!

    My class contains the following property...

    Private _IsDirty As Boolean

    Public Event IsDirtyChanged As EventHandler

    Public Property IsDirty() As Boolean
         Get
             Return _IsDirty
         End Get
         Set(ByVal Value As Boolean)
             _IsDirty = Value
             RaiseEvent IsDirtyChanged(Me, New EventArgs)
         End Set
    End Property

    ...and I want to databind it with toolbar button (named as tbbSave), and
    menuiten (named as mnuSave). Then these buttons are enabled only when
    any of databound controls is changed ie. "dirty".

    Problem is, using menuitems and toolbar buttons it seems to be not
    possible to bind like normal button, I mean something like...

    mnuSave.DataBindings.Add("Enabled", oMyObject, "IsDirty")

    ...so any succestions how to do this using mnuSave-menuitem and
    tbbSave-toolbar button?

    --
    Thanks in advance!
    Mika
    

  • Next message: Serge Shimanovsky: "Bind CheckedListBox to ArrayList of objects"
    Loading