473,761 Members | 9,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display properties in PropertyGrid


Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to display
more user-friendly "property" names, i.e. names that contain spaces, just
the way the VS IDE does when you select a file in Solution Explorer to view
its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names as
they contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax
Dec 19 '05 #1
5 5746
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDes criptor interface found in the
System.Componen tModel namespace, override the GetProperties() and create
your own PropertyDescrip tors overriding the DisplayName property.

Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realdn.net
http://www.realsoftware.be

<pax> wrote in message news:ua******** ********@TK2MSF TNGP14.phx.gbl. ..

Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to display more user-friendly "property" names, i.e. names that contain spaces, just
the way the VS IDE does when you select a file in Solution Explorer to view its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names as
they contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax

Dec 19 '05 #2
Thanks a lot, Gabriel. There's a lot of information in your swift reply, I
hope I'll be able to find my way through...
And yes, the class should be mine, I guess there would be nothing to expect
if it were not mine.

Thanks.
pax

"Gabriel Lozano-Morán" <gl*****@no-spam.org> wrote in message
news:OT******** ******@tk2msftn gp13.phx.gbl...
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDes criptor interface found in the
System.Componen tModel namespace, override the GetProperties() and create
your own PropertyDescrip tors overriding the DisplayName property.

Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realdn.net
http://www.realsoftware.be

<pax> wrote in message news:ua******** ********@TK2MSF TNGP14.phx.gbl. ..

Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to

display
more user-friendly "property" names, i.e. names that contain spaces, just the way the VS IDE does when you select a file in Solution Explorer to

view
its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names as they contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax


Dec 19 '05 #3
Gabriel Lozano-Morán wrote:
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDes criptor interface found in the
System.Componen tModel namespace, override the GetProperties() and create
your own PropertyDescrip tors overriding the DisplayName property.

Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realdn.net
http://www.realsoftware.be

<pax> wrote in message news:ua******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to


display
more user-friendly "property" names, i.e. names that contain spaces, just
the way the VS IDE does when you select a file in Solution Explorer to


view
its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names as
they contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax


Here's what I found a year ago when implementing property grid
customizations:

http://www.codeproject.com/vb/net/us...opertygrid.asp
http://www.codeproject.com/cs/miscct...ectiondata.asp
http://www.codeproject.com/vb/net/Pr...rid_Editor.asp
http://www.codeproject.com/csharp/Dz...tionEditor.asp

http://stup.org/blogs/nidhogg/archiv...02/18/279.aspx
http://www.codeproject.com/cs/miscctrl/DynPropGrid.asp

HTH,
Andy
--
To email me directly, please remove the *NO*SPAM* parts below:
*NO*SPAM*xmen40 @*NO*SPAM*gmx.n et
Dec 19 '05 #4
An example found using google:
http://216.239.59.104/search?q=cache...playname&hl=nl

Gabriel
Dec 19 '05 #5

Thank you very much, Andreas.
"Andreas Mueller" <me@privacy.net > wrote in message
news:40******** *****@individua l.net...
Gabriel Lozano-Morán wrote:
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDes criptor interface found in the
System.Componen tModel namespace, override the GetProperties() and create
your own PropertyDescrip tors overriding the DisplayName property.

Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realdn.net
http://www.realsoftware.be

<pax> wrote in message news:ua******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to


display
more user-friendly "property" names, i.e. names that contain spaces, justthe way the VS IDE does when you select a file in Solution Explorer to


view
its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names asthey contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax


Here's what I found a year ago when implementing property grid
customizations:

http://www.codeproject.com/vb/net/us...opertygrid.asp
http://www.codeproject.com/cs/miscct...ectiondata.asp
http://www.codeproject.com/vb/net/Pr...rid_Editor.asp
http://www.codeproject.com/csharp/Dz...tionEditor.asp

http://stup.org/blogs/nidhogg/archiv...02/18/279.aspx
http://www.codeproject.com/cs/miscctrl/DynPropGrid.asp

HTH,
Andy
--
To email me directly, please remove the *NO*SPAM* parts below:
*NO*SPAM*xmen40 @*NO*SPAM*gmx.n et

Dec 19 '05 #6

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

Similar topics

1
1462
by: mrVithan | last post by:
I create a user control object and show its properties through a propertygrid object in my application. It is sure that there are 100 hundred of properties inherited from System.Windows.Forms.UserControl and they are all showed on the propertygrid. Is there a way i can hide all these inherited properties and show only my user control's properties ?
0
1538
by: Peter Verburgh | last post by:
Hello, I'm using PropertyGrid control to show the properties of an control. There are standard properties for each usercontrol like "Cursor, Dock ,...ect" I don't want to show this properties in the Propertygrid control , but i want only show m custom made properties. How can i easy hide those properties ?
2
1538
by: JJ L. | last post by:
Hello. I have a project that consists of nine different objects, each serving their own purpose. In the past I have just created a form for each one, and then whenever you call, say, object.Display(), it would call up the form associated with that object. This form only displays information, it doesn't allow the user to edit any information. Is it possible to find the properties of a certain object, and then loop through creating labels...
2
14323
by: X.W. | last post by:
Hi group, I have a class like this: class Person { public uint Age { get{...} set{...} }
2
1314
by: Benny Raymond | last post by:
I'm working on a program that has a treeview, and each tree node refrences a row in my database. I really like how the properties section of the collections editor looks - is this a control that is available to use? I thought it was a datagrid, but I can't get the datagrid to show up like the collections properties thing. Any help would be awesome thanks! ~benny
0
945
by: ljlevend | last post by:
I am exposing a property as an expandable property in a PropertyGrid by assigning a System.ComponentModel.TypeConverter attribute to the property. Is there any way to have the PropertyGrid group the expanded items in categories as is done with PropertyGrid.SourceObject's properties when PropertyGrid.PropertySort = CategorizedAlphabetical? Thank you, Lance
4
35989
by: Steve | last post by:
I am using a property grid to display a classes properties, all is OK for single value properties but i need to display a list of strings for the user to select from and update the property value based on the selection. A Drop down list in the property grid would be ideal. For instance - like the StartPosition property of a form in the IDE. I think this would be a simple and often used procedure but i have not been able to locate an...
3
2136
by: ippo | last post by:
Hi all, I have a silly problem with treeview. I'm using .NET 2.0. I need to set the two properties treeNodeSrc - treeNodeTypeSrc at run time using C#, but in the treeViews that I define, these two properties don't exist!!! Do I need to import something more to use all the properties of the treeview? Right now, I 've just installed .NET 2005 Thank you all
3
5131
by: michelqa | last post by:
Hi, I have a form with a control..(a button for example). Then the control properties are displayed in a propertyGrid control. Is there any simple way to remove some unwanted properties from the propertyGrid....removing the "AccessibleName" properties by example? Any example about how to play with the PropertyDescriptorCollection to remove some properties??
0
9554
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
9376
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9923
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
8813
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
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...
1
3911
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
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
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.