473,547 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 ?

Nov 21 '05 #1
0 1101

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

Similar topics

3
1770
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 each instance (it returns an instance of a delegate that points to the same method no matter what the instance). I thought the best way to make...
7
2288
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
3637
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 in it (and change the data for everyone else using the property). I can see from:...
27
1833
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 placed on a form. That's confusing. How can I make that property not show in the properties window?
1
11100
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 they don't have to manually cycle through 35 or 40 tables and change the property. VBA help says: "To set the SubdatasheetName property by using...
4
2798
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 property (which also contains its own ""Width" and "Height" members), will someone running my app on a German version of Windows for instance still...
11
4163
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 this? static string CSVFileName { public get { return _CSVFileName; }
2
1519
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 times the same things like that: Public Property Price() As Double Get
2
7199
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 relationships with other persons. If there is a change in the relationship (i.e. status, type etc) then we want the PropertyChanged event to fire and...
0
7510
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7437
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6032
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5362
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3473
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1923
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1050
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
748
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.