Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » HeaderCtrl Background Color
HeaderCtrl Background Color [message #860] |
Mon, 06 February 2006 09:31 |
|
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:
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?
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 27 04:23:04 CEST 2024
Total time taken to generate the page: 3.07140 seconds
|