By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,579 Members | 1,670 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,579 IT Pros & Developers. It's quick & easy.

Property that don't change

P: n/a
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.VisibleSave = 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.Win.UltraWinGrid.UltraGrid
Friend WithEvents mnuSave As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Dim Appearance1 As Infragistics.Win.Appearance = New
Infragistics.Win.Appearance
Me.ctxMenu = New System.Windows.Forms.ContextMenu
Me.mnuSave = New System.Windows.Forms.MenuItem
ctxMenu().MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{mnuSave})
Me.mnuEnregistrer.Text = "Save"

<Description("Indicate if the Save menu is visible or not."),
Category("Apparence"), DefaultValue(False)> _
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.VisibleSave = True, the property don't change to True. Can
somebody explain me why my property does not change? What I do wrong ?

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.