473,812 Members | 3,674 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hide a property in derived class in propertygrid

Hi all,

how can I hide a property in a derived class in a propertygrid.

Let's say I have a classX and a derived classY. A property in classX will be
visible in the propertygrid but the same property in the derived classY will
not be visible in the propertygrid.

Does anyone know how to do this ?
May 20 '07 #1
2 2137
"MauriceM" <Ma******@discu ssions.microsof t.comwrote in message
news:EF******** *************** ***********@mic rosoft.com...
Hi all,

how can I hide a property in a derived class in a propertygrid.

Let's say I have a classX and a derived classY. A property in classX will
be
visible in the propertygrid but the same property in the derived classY
will
not be visible in the propertygrid.

Does anyone know how to do this ?
Override the property and add the [Browsable(false )] attribute.

May 20 '07 #2
Thx John, I'm going to try this out. Sounds very logic.

"John Vottero" wrote:
"MauriceM" <Ma******@discu ssions.microsof t.comwrote in message
news:EF******** *************** ***********@mic rosoft.com...
Hi all,

how can I hide a property in a derived class in a propertygrid.

Let's say I have a classX and a derived classY. A property in classX will
be
visible in the propertygrid but the same property in the derived classY
will
not be visible in the propertygrid.

Does anyone know how to do this ?

Override the property and add the [Browsable(false )] attribute.
May 20 '07 #3

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

Similar topics

7
9734
by: siddhiash | last post by:
Hi Friends I want to add PasswordChar Property which shows ****** for string which I type in PropertyGrid Control. Regards, Siddharth
3
2836
by: Lance | last post by:
I have a situation where I want to show a property when one object is selected in a PropertyGrid, but I want to hide that property when more than one object is selected. For example, lets say I have an object with a Name property that must be unique. If one of these objects is selected by a PropertyGrid, then I want to show the Name property in the PropertyGrid so the user can change the object's name. But, if more than one of these objects...
4
3350
by: Paul Wu | last post by:
Is there a way to constract a derived class that hides certain public members of a base class ? With the following code, a class that derives from DerivedClass can still see the member "Name" in the base class. Can anyone provide me with an example that will do what I need? Public Class BaseClass Private mName As String = "Bob" Public Overridable Function Name() As String Name = mName End Function End Class
9
3506
by: Martin Widmer | last post by:
Hello! I would like to hide one property of a base class in a derived class. How could it be done? I tried to override it with a private property, but that doesn't seem to do the hiding. Martin
1
1559
by: Steve Teeples | last post by:
Using VS2005, is the a simple method to hide or show a property within a propertygrid based upon the changing value of another property within the propertygrid. For example, if I change a boolean property to true then I'd like to show a second property that only applies when the first property is true. -- ----------- Thanks, Steve
8
5870
by: active | last post by:
If I create a UserControl that inherits from, say, Panel, and I do not want my UserControl to have a property that it inherits from Panel. How can I remove it. For example, I might not want by control to have a BackColor property even though it inherited that property from Panel. Thanks
0
235
by: Tom Shelton | last post by:
On 2008-04-24, J-L <alphomega_sansca_@free.frwrote: I believe if you apply the BrowseableAttribute set to false to the property, then it won't show in the property grid: public in MyProperty{get;set;} HTH
0
1289
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
Assuming you mean a control which has a runtime only property, then apply the following attribute to the property: -- Ciaran O''Donnell http://wannabedeveloper.spaces.live.com
10
10050
by: Derek Hart | last post by:
I can set focus to my property grid by using propgrid.Focus - but how can I set the default property that is always first? Or just set focus to the default property? Can this be done?
0
9734
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10404
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10417
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10139
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7678
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5568
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4357
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
2
3881
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3029
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.