Property that don't change

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc Robitaille

    #1

    Property that don't change

    Hello everyone,

    I have a control which inherits from another control. I added a contextual
    menu to the new control. To this new control, I added a Boolean property.
    This property enables me to make visible or not one of the elements of my
    contextual menu. By default, the property is allways set to False. For a
    reason which I does not understand, even if I do Control.Visible Save = True,
    the property does not change at all. It remains to False. Here the code of
    my control. Can somebody explain me why my property does not change?

    Public Class PAIWinGrid
    Inherits Infragistics.Wi n.UltraWinGrid. UltraGrid
    Friend WithEvents mnuSave As System.Windows. Forms.MenuItem
    <System.Diagnos tics.DebuggerSt epThrough()> Private Sub
    InitializeCompo nent()
    Dim Appearance1 As Infragistics.Wi n.Appearance = New
    Infragistics.Wi n.Appearance
    Me.ctxMenu = New System.Windows. Forms.ContextMe nu
    Me.mnuSave = New System.Windows. Forms.MenuItem
    ctxMenu().MenuI tems.AddRange(N ew System.Windows. Forms.MenuItem( )
    {mnuSave})
    Me.mnuEnregistr er.Text = "Save"

    <Description("I ndicate if the Save menu is visible or not."),
    Category("Appar ence"), DefaultValue(Fa lse)> _
    Public Property VisibleSave() As Boolean
    Get
    Return mnuSave .Visible
    End Get
    Set(ByVal Value As Boolean)
    mnuSave .Visible = Value
    End Set
    End Property

    If I do Control.Visible Save = True, the property don't change to True. Can
    somebody explain me why my property does not change? What I do wrong ?



Working...