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 » Wrong display in arrayctrl
Wrong display in arrayctrl [message #8199] Sun, 18 February 2007 10:51 Go to previous message
forlano is currently offline  forlano
Messages: 1207
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

several versions ago with the following Display:

class ColoredCell : public Display
{
public:
  static bool isBlack(String s);
  void PaintBackground(Draw& w, const Rect& r, const Value& q,
	                     Color ink, Color paper, dword style) const;
	
};

bool ColoredCell::isBlack(String s)
{
  if(s[1] == 'B') return true;  
  return false;
}

void ColoredCell::PaintBackground(Draw& w, const Rect& r, const Value& q,
	                               Color ink, Color paper, dword style) const
{
    if( isBlack(AsString(q)) )	paper = Color(255, 150, 150);	
	Display::PaintBackground(w, r, q, ink, paper, style);
}

I was able to set pink the background of a cell. Only I saw that the color is not uniform. It does not appear under all the content of cell:

index.php?t=getfile&id=462&private=0

It seems a problem of transparency.
Am I wrong?

Luigi
  • Attachment: pic1.jpg
    (Size: 13.54KB, Downloaded 639 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: just looking for a basic arrayctrl example please
Next Topic: GridCtrl and mingw compiler error
Goto Forum:
  


Current Time: Tue Jul 08 14:54:40 CEST 2025

Total time taken to generate the page: 0.02855 seconds