Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » How to change color background of a cell?
|
Re: How to change color background of a cell? [message #20313 is a reply to message #20274] |
Mon, 09 March 2009 10:54   |
darthspawn
Messages: 58 Registered: February 2009
|
Member |
|
|
I have do the change of color, but I don't understand perfectly this solution.
I copied some code, the code is :
class RedBackGround : public Display
{
public:
void Paint(Draw& w, const Rect& r, const Value& value,
Color ink, Color paper, dword s) const
{
Display::Paint(w, r, value, ink, LtRed(), s);
}
};
class GreenBackGround : public Display
{
public:
void Paint(Draw& w, const Rect& r, const Value& value,
Color ink, Color paper, dword s) const
{
Display::Paint(w, r, value, ink, LtGreen(), s);
}
};
and when i want to change color, after a double left click:
arrctr_Grid.Set(int_GridPos, Col_Active ,(WString)"N");
arrctr_Grid.SetDisplay(int_GridPos, Col_Active, Single<GreenBackGround>());
is not possible do a thing like "arrctr_Grid.GetDisplay(row, col).ChangeColor(Green);
?
thanks
|
|
|
|
|
|
Goto Forum:
Current Time: Fri May 09 11:57:05 CEST 2025
Total time taken to generate the page: 0.02586 seconds
|