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 » HeaderCtrl Background Color
HeaderCtrl Background Color [message #860] Mon, 06 February 2006 09:31 Go to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
I couldn't catch the idea with PaintBackground so I've added
a little to HeaderCtrl.h and HeaderCtrl.cpp. The result is here:
index.php?t=getfile&id=56&private=0
then you can have something like:
array.HeaderObject().SetTabColor(1, SYellow);

or just the actual HeaderCtrl test is this:
#include <CtrlLib/CtrlLib.h>

void test(){
	//just to demonstrate WhenAction
}

GUI_APP_MAIN
{
//	ArrayCtrl arr;
//	array.HeaderObject().SetTabColor(1, SYellow); 

	TopWindow w;
	HeaderCtrl hdr;
	
	hdr.SetRect(10,10,550,30);

	hdr.Add("blue-action",1.0,SBlue);
	hdr.Tab(0).WhenAction=callback(test);

	hdr.Add("yellow-red",1.4,SYellow);
	hdr.Tab(1).SetInk(SRed);

	hdr.Add("green",0.7,SGreen);
	hdr.Add("brown",0.5,SBrown);
	hdr.Add(AsString(hdr.GetTabColor(3)));
	hdr.Add("red",0.5,SRed);			
	        
	w.Add(hdr);
	w.Run();
}

how does it compare with PaintBackground?
Re: HeaderCtrl Background Color [message #893 is a reply to message #860] Tue, 07 February 2006 13:52 Go to previous messageGo to next message
hojtsy is currently offline  hojtsy
Messages: 241
Registered: January 2006
Location: Budapest, Hungary
Experienced Member
Quote:

how does it compare with PaintBackground?
For a PaintBackground example see the "ArrayCtrl cell color" topic

[Updated on: Tue, 07 February 2006 13:54]

Report message to a moderator

Re: HeaderCtrl Background Color [message #898 is a reply to message #893] Tue, 07 February 2006 14:44 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I have placed it to the uppsrc, just changed the method of setting the color (To HeaderCtrl::Column::SetPaper).

Mirek
Previous Topic: how to convert HeaderCtr to vertical?
Next Topic: ArrayCtrl::Paint optimization
Goto Forum:
  


Current Time: Sat Apr 27 04:23:04 CEST 2024

Total time taken to generate the page: 3.07140 seconds