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 » ColorScheme for individual cells
Re: ColorScheme for individual cells [message #36267 is a reply to message #36156] Thu, 17 May 2012 13:09 Go to previous messageGo to previous message
piotr5 is currently offline  piotr5
Messages: 107
Registered: November 2005
Experienced Member
You're right, it isn't overkill in terms of ressources. what I meant however is it's overkill in terms of maintenence. one would need to copy the upp code for text-display into an own function and alter those lines. if upp-code changes you'd also need to change that code to keep appearance constant over all array-controls. in short, bad code-reuse.

imho arrayctrl needs some changes anyway. for example there's no callback for after editing a cell, only one for the case of successful editing. all the deprecated cursor-callbacks should be re-considered by adding an actual cursor in addition to the selection. (graphically a border around the current cell and/or a seperator-line between rows during drag'n'drop.)

the idea behind a color-scheme was to do such things like changing colour every 5 lines or removing the column-lines and display the control as a checker-board. and as I said, I'd like to add redundant rows and grey them out so the user knows they aren't important. but the point is I'd need individual Display for rows and not for columns. that might be an alternative way of solving my problem except that it would be more rarely needed than for example changing colour every 5 rows.

I were asking for opinions on my implementation. for example maybe it would be better to use an actual colouring-scheme class passed as a template-parameter to arrayctrl. allows for inlining the actual colour-decision. but somehow this trick is rarely used in upp ctrl-derived classes...
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bugs with GridCtrl in Ubuntu 12.04
Next Topic: Problem with IsRowEditable
Goto Forum:
  


Current Time: Sun May 05 21:07:33 CEST 2024

Total time taken to generate the page: 0.02486 seconds