473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 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
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
0 1086

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Erik Harris | last post by:
I apologize if this is a stupid question - I'm relatively new to OOP. I have a property that must exist in a class in order to be used by another class. The property, however, does not change with...
7
by: vh | last post by:
Hi, I'm new to C#. Most examples about properties I found are sth like the following: class A{ private int property; public int Property { get { return property; } set { property = value; } }...
3
by: Allan Ebdrup | last post by:
I have a dictionary that I would like to load with data and then have as read only, so I can pass it as a result of a get on a property and not have the recipient of the dictionary change the data...
27
by: Just Me | last post by:
I made a Usercontrol that must have AutoScroll set to true when it is used. So I set it to True in the Load event. However the property still shows in the properties window when the control is...
1
by: Jim M | last post by:
After learning that the 'subdatasheet name' property set to "" can adversely effect database speed, I wanted to send a small code snippent to my end users to reset the SubdatasheetName Property so...
4
by: John Allen | last post by:
Hi there, Does anyone know if the standard "PropertyGrid" control is (foreign) language sensitive. If I display an object in the control, and my object has the native .NET "Size" struct as a...
11
by: Eran.Yasso | last post by:
Hi All, this issue curious me for long time. Any one knows why Microsoft didn't allow to different access modifier for set and get? To be more specific, why didn't they allow us to do it like...
2
by: C. Herzog | last post by:
Hi! I want to create a huge amount of classes. All classes have in common that the change of a property should fire an Change-Event and maybe do other things. I don't want to write thousand...
2
by: Dinsdale | last post by:
We have created a object library that implements the INotifyPropertyChanged.PropertyChanged to bubble changes up to higher level classes. For instance, we have a person class that can have...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.