471,616 Members | 1,459 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,616 software developers and data experts.

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.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
Dim Appearance1 As Infragistics.Win.Appearance = New
Me.ctxMenu = New System.Windows.Forms.ContextMenu
Me.mnuSave = New System.Windows.Forms.MenuItem
ctxMenu().MenuItems.AddRange(New System.Windows.Forms.MenuItem()
Me.mnuEnregistrer.Text = "Save"

<Description("Indicate if the Save menu is visible or not."),
Category("Apparence"), DefaultValue(False)> _
Public Property VisibleSave() As Boolean
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
0 1021

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by vh | last post: by
3 posts views Thread by Allan Ebdrup | last post: by
4 posts views Thread by John Allen | last post: by
11 posts views Thread by Eran.Yasso | last post: by
1 post views Thread by XIAOLAOHU | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.