Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl cell color
Re: ArrayCtrl cell color [message #800 is a reply to message #797] Fri, 03 February 2006 00:06 Go to previous messageGo to previous message
hojtsy is currently offline  hojtsy
Messages: 241
Registered: January 2006
Location: Budapest, Hungary
Experienced Member
luzr wrote on Thu, 02 February 2006 17:11

Hmmm.. Now thinking about it.... What about using the same Display for margin, just with "Null" for the Value? Maybe would not cover absolutely all cases, but you could easily solve the rest using "Margin(0)" option. At it would work pretty "automagically"... uhm, but maybe it is not a good idea (sometimes, you would really want to display Null as distinct value).
I think Null is not a good idea, for the reasons you told, and also for this other reason: I would like the background color to depend on the value. See my screenshot a few posts ago: in my application background color should be
* red if cell value is "FAILED"
* green is cell value is "passed"
* default otherwise
So passing Null does not work.
I compare my two alternatives: My alternative 1 (PaintMargin method) needs no additional subclass for the margin if you are recoloring the whole cell background, but needs many subclasses if you are just putting some fancy thing into the margin of many different cells. Alternative 2 needs an additional subclass for the margin defined by the client code, but it can apply that MarginDisplay class for any kind of cell withouth further subclassing them.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to set/get data in a composite embedded ctrl in an arrayctrl
Next Topic: Combine Cells?
Goto Forum:
  


Current Time: Tue May 14 20:12:27 CEST 2024

Total time taken to generate the page: 0.02430 seconds