Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Wrong display in arrayctrl
Wrong display in arrayctrl [message #8199] |
Sun, 18 February 2007 10:51 |
|
forlano
Messages: 1185 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:
It seems a problem of transparency.
Am I wrong?
Luigi
-
Attachment: pic1.jpg
(Size: 13.54KB, Downloaded 559 times)
|
|
|
Re: Wrong display in arrayctrl [message #8297 is a reply to message #8199] |
Thu, 01 March 2007 08:49 |
|
forlano
Messages: 1185 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
forlano wrote on Sun, 18 February 2007 10:51 | 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 now I saw that the color is not uniform. It does not appear under all the content of cell:
It seems a problem of transparency.
Am I wrong?
Luigi
|
This is a picture of the look with the previous release that show what I mean:
Luigi
-
Attachment: pic3.jpg
(Size: 20.33KB, Downloaded 482 times)
|
|
|
|
|
|
Goto Forum:
Current Time: Mon Apr 29 08:05:27 CEST 2024
Total time taken to generate the page: 0.01824 seconds
|