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 » 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 Go to previous messageGo to previous message
darthspawn is currently offline  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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: RightClick on HeaderCtrl
Next Topic: How to set fontsize in GridCtrl
Goto Forum:
  


Current Time: Sat Jun 08 02:34:53 CEST 2024

Total time taken to generate the page: 0.01980 seconds