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 #795 is a reply to message #793] Thu, 02 February 2006 22:46 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 16:10

Note that if I undestand the issue well, alternative 1 does not solve the problem as you would have to subclass anyway.
You would only need to subclass the Display of the cell you would like to recolor, which you subclass anyway because you redefining the Paint method. You would just redefine the PainMargin too in the same class, which would use the same background color or pattern. But you would no longer need to subclass all other Display classes that are used by other cells in the same Column.

Quote:

Provide ArrayCtrl::Column::MarginColor
This disables backround patters or gradients and value-dependent background color.

Quote:

Provide "MarginDisplay" class that has as attributes another Display and the margin(s).
My alternative 2 is simillar but withouth the indirection step. In my idea the ArrayCtrl would use the marginDisplay to paint the margin area, and then the ArrayCtrl would use the Display to paint the content area. The type of the marginDisplay could be simply pointer to Display, and the default value would be a pointer to a MarginDisplay, which would just draw the rectangle in the Paint. I am afraid I was not suffiently clear, so I am thinking about implementing the idea to show what I mean.

Quote:

Provide "DisplayWithMargin" template
This would just help in adding the margin to a choosen Display, but then the Column margin should be removed, and every other Display subclass should be provided with a margin too. Not really convenient.
 
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 13:19:46 CEST 2024

Total time taken to generate the page: 0.02517 seconds