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

Property Grid Question.

pnp
When I use a custom class object as the selected object of a property gird
control is there a way to set custom names fro the grouped sections shown in
it?

Thanks,
Peter
Nov 16 '05 #1
3 1891
When you define the property in your class.. you can specify designer
attributes in square brackets [] immediately above the property definition.
The attribute you want is "Category".
e.g.
[Category("SpecialCategory"), Browsable(true), DefaultValue(88),
MergableProperty(true),
RefreshProperties(System.ComponentModel.RefreshPro perties.All),
Description("Width of the Label")]

public int LabelWidth
{ get { return label.Width;}set {label.Width =value;textBox.Width =
this.Width - value;}

(example is from a custom contrl that contains a label plus a textbox.)

-Rachel

----- Original Message -----
From: "pnp" <pnp.at.softlab.ece.ntua.gr>
Newsgroups: microsoft.public.dotnet.languages.csharp
Sent: Monday, August 23, 2004 9:25 AM
Subject: Property Grid Question.

When I use a custom class object as the selected object of a property gird
control is there a way to set custom names fro the grouped sections shown in it?

Thanks,
Peter


"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message
news:Oc*************@tk2msftngp13.phx.gbl... When I use a custom class object as the selected object of a property gird
control is there a way to set custom names fro the grouped sections shown in it?

Thanks,
Peter

Nov 16 '05 #2
Use Category attribute for that property.

"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message
news:Oc*************@tk2msftngp13.phx.gbl...
When I use a custom class object as the selected object of a property gird
control is there a way to set custom names fro the grouped sections shown in
it?

Thanks,
Peter

Nov 16 '05 #3
pnp
Thanks you Rachel.
Peter

"Rachel Suddeth" <ra****@bldhound.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
When you define the property in your class.. you can specify designer
attributes in square brackets [] immediately above the property definition. The attribute you want is "Category".
e.g.
[Category("SpecialCategory"), Browsable(true), DefaultValue(88),
MergableProperty(true),
RefreshProperties(System.ComponentModel.RefreshPro perties.All),
Description("Width of the Label")]

public int LabelWidth
{ get { return label.Width;}set {label.Width =value;textBox.Width =
this.Width - value;}

(example is from a custom contrl that contains a label plus a textbox.)

-Rachel

----- Original Message -----
From: "pnp" <pnp.at.softlab.ece.ntua.gr>
Newsgroups: microsoft.public.dotnet.languages.csharp
Sent: Monday, August 23, 2004 9:25 AM
Subject: Property Grid Question.

When I use a custom class object as the selected object of a property gird control is there a way to set custom names fro the grouped sections shown
in
it?

Thanks,
Peter
"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message
news:Oc*************@tk2msftngp13.phx.gbl...
When I use a custom class object as the selected object of a property

gird control is there a way to set custom names fro the grouped sections

shown in
it?

Thanks,
Peter


Nov 16 '05 #4

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

Similar topics

0
by: Mark | last post by:
Greetings all, I am new to VB.net. I am trying to use the PropertyGrid Control to display database schema. So far so good. The property grid control displays the database field properties in...
0
by: Mark | last post by:
Greetings. I am trying to use the PropertyGrid Control to display database schema. So far so good. The property grid control displays the database field properties in the property grid. My...
4
by: Ananth | last post by:
I would like to know if we can enter properties (name-value pairs) dynamically into a property grid object using C#. Also is it possible to have the text in the property grid (within the indiidual...
1
by: moondaddy | last post by:
I have a group of elements inside a grid and want to align them along the left side of the grid. I also want have this group centered vertically and the xaml below demonstrates the appearance want...
1
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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,...

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.