473,395 Members | 1,720 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,395 software developers and data experts.

Hide property at runtime.

I am looking for a way to hide a property I created on a user control from a
property grid at runtime but allow it to be seen at design time.

Any ideas?

I tried setting the category of the property to 'Design' and that does not
do it.

I tried adding the 'DesignOnly' attribute and that does not do it.

I am about to break out Reflector and have a peek myself to see if I can
find it from the libraries themselves because as best I can tell the
Usercontrol base class does it for the Name, GenerateMember, Locked, and
Modifiers properties. I just want to tack my property in there.

Hmmmm

--
Me
Anywhere USA
Jan 13 '07 #1
2 2672
I do remember that it's an attribute ---

pretty sure it's <Browsable(False)>

"Ray Cassick" <rc*************@enterprocity.comwrote in message
news:Oq**************@TK2MSFTNGP02.phx.gbl...
>I am looking for a way to hide a property I created on a user control from
a property grid at runtime but allow it to be seen at design time.

Any ideas?

I tried setting the category of the property to 'Design' and that does not
do it.

I tried adding the 'DesignOnly' attribute and that does not do it.

I am about to break out Reflector and have a peek myself to see if I can
find it from the libraries themselves because as best I can tell the
Usercontrol base class does it for the Name, GenerateMember, Locked, and
Modifiers properties. I just want to tack my property in there.

Hmmmm

--
Me
Anywhere USA

Jan 13 '07 #2
That hides it always from the property Grid. I only want the property to be
hidden when you look at the properties of the control at runtime.

Here is some background. I am designing a control that is going to be
manipulated at BOTH runtime (on a custom design surface) and at design time.
I need a few properties seen in the property grid ONLY at design time and
not when the controls properties are seen in a property grid at runtime.

Its a bit confusing I know but I have seen this be done right before my very
eyes. All the standard Usercontrol properties in the Design category act
this way.
"Matt F" <mf****************@nospam.nospamwrote in message
news:up**************@TK2MSFTNGP04.phx.gbl...
>I do remember that it's an attribute ---

pretty sure it's <Browsable(False)>

"Ray Cassick" <rc*************@enterprocity.comwrote in message
news:Oq**************@TK2MSFTNGP02.phx.gbl...
>>I am looking for a way to hide a property I created on a user control from
a property grid at runtime but allow it to be seen at design time.

Any ideas?

I tried setting the category of the property to 'Design' and that does
not do it.

I tried adding the 'DesignOnly' attribute and that does not do it.

I am about to break out Reflector and have a peek myself to see if I can
find it from the libraries themselves because as best I can tell the
Usercontrol base class does it for the Name, GenerateMember, Locked, and
Modifiers properties. I just want to tack my property in there.

Hmmmm

--
Me
Anywhere USA


Jan 13 '07 #3

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

Similar topics

5
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
8
by: Hanson | last post by:
I have a datagrid control in an aspx page. The datagrid columns will be dynamically generated according to the pre-page's search condition, I want to hide some columns in the datagrid. is that...
6
by: Paul | last post by:
Hi I am trying to conditionally hide a user control on a form in the code. There is a visible element in the properties box of the user control but in the .vb file (in the code) the object does not...
3
by: Paul | last post by:
Hi I am trying to show and hide a line dynamically. I setup the line in HTML using the HR tag but it does not have a visible attribute. Also it does not allow run at server added to it. Thanks....
4
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...
4
by: BrianDH | last post by:
Hi I have an application with 3 windows forms. One of which I load at startup but hide, then show/hide based on users click. How can I test to see if the windows is hidden, or is at the moment...
7
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field...
13
by: jeff | last post by:
I am attempting to be able to show and hide a form called viewAllForm. I declared an instance of the form in a module. Public viewAllForm As New frmViewAll However I keep getting runtime errors...
0
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
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
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
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...
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
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...

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.