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

Highligting property grid lines

Ive got my custom property grid to work ok,
but Id realy like to distinguish fields wich dont have their default value,
is there any way to specify diferent colors for different lines?

theres a couple of long pages on propertygrid on msdn,
but doesnt seem to tell how to do it, only alternative I can think of is to
partition
the table, or to put an asterisk in the field name or data,
or to partition all of wich arent ideal...

many thanks
Colin =^.^=
Jun 27 '08 #1
4 3527
You can do the "bold" thing if that helps... for simple values, use
DefaultValueAttribute to specify the default; for more complex values,
provide a method

bool ShouldSerialize{PropertyName}() {...}

and return true if it is non-default.

Alternatively - there is a pretty good commercial alternative to
PropertyGrid - I looked at it once and it offered a lot of flexibility
(more than PropertyGrid) - but the name escapes me at the moment. I
could probably look it up if you wanted...

Marc
Jun 27 '08 #2
Found the alternative PropertyGrid:

http://www.visualhint.com/index.php/propertygrid/
Jun 27 '08 #4
"Marc Gravell" <ma**********@gmail.comwrote in message
news:81**********************************@d1g2000h sg.googlegroups.com...
You can do the "bold" thing if that helps... for simple values, use
DefaultValueAttribute to specify the default; for more complex values,
provide a method

bool ShouldSerialize{PropertyName}() {...}

and return true if it is non-default.

Alternatively - there is a pretty good commercial alternative to
PropertyGrid - I looked at it once and it offered a lot of flexibility
(more than PropertyGrid) - but the name escapes me at the moment. I
could probably look it up if you wanted...

Marc
many thanks, I had the defualt attribute supplied by my 'facade' :g
but i didnt notice any difference, however making the ShouldSerialize
to return true does make the data text apear bold, although this doesnt help
if the text is blank but if its blank then its not likely to be different
from defualt.

I had just about given up after finding a couple of threads on msdn wich
stated it
was imposible to change the color for each item such as ...
http://forums.microsoft.com/MSDN/Sho...82205&SiteID=1
its a shame one cant just simply modify bits of it ...

I have many items wich are defined in base classes and so
a lot of the items havnt changed becuase they arnt relavent,
and so it would be useful to see quickly wich items are relavent/changed.

Im not interested in commercial items as this isnt realy a commercial
product.
im using this with the dockpanel 2.2 from the code project,
wich does a very nice IDE style dockable layout.
there are a couple of similar propertygrid controls but my experience
it can take quite some time to get to know how to use,
by wich time it seems like I could of written my own.
Colin =^.^=
Jun 27 '08 #5

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

Similar topics

0
by: SlipperyCat | last post by:
I want to use the property grid to display instances of dynamic types. A problem I'm having is that the property grid is not respecting attributes that are set with SetCustomAttribute. I've taken...
0
by: stulika19 | last post by:
Hi I am using Collection Editor in my Property Grid.When I change value of a property in the property grid, the PropertyValueChanged event is raised and and I am able to execute certain lines of...
5
by: Enigma Curry | last post by:
I'm playing around with matplotlib for the first time. I'm trying to make a very simple histogram of values 1-6 and how many times they occur in a sequence. However, after about an hour of...
10
by: kaczmar2 | last post by:
Hey there, I have a large image in a browser window, and I would like a way to overlay grid lines on top of the image, so a user can show the grid or hide the grid lines. The grid would cover...
3
by: kaczmar2 | last post by:
Hey there, I have a large image in a browser window, and I would like a way to overlay grid lines on top of the image, so a user can show the grid or hide the grid lines. The grid would cover...
8
by: stephen | last post by:
Hi, I make use of properties to store values that are relevant to the page but this time I am posting the page to itself and the values are Zero or null (they disappear). is there any other way...
6
by: Ron M. Newman | last post by:
Hi, I have a problem with dynamically putting dynamic properties on the property grid. My app has no idea what it'll be showing at compile time. How do I dynamically add properties to the...
1
by: --== Alain ==-- | last post by:
Hi, I finally found how to update the render of my custom control when one of its property value changed. However, i would like to know if there is not another way, because i'm afraid about...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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,...
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...

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.