Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Problem w/ HeaderCtrl.SetPaper() in my app.
Problem w/ HeaderCtrl.SetPaper() in my app. [message #14458] |
Tue, 26 February 2008 22:16 |
jlfranks
Messages: 57 Registered: May 2007 Location: Houston, TX, USA
|
Member |
|
|
I'm can't seem to make SetPaper() work for
ArrayCtrl::HeaderCtrl work. I've included this example
app that demonstrates the problem.
Can anyone see what I'm doing wrong in making this work?
---------- environment and Upp version ------
Linux
Upp-2007.1.i386
---------- example code ---------------------
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class ArrayCtrlTest : public TopWindow
{
public:
ArrayCtrlTest()
{
Zoomable().Sizeable();
ArrayCtrl::Column & c1 = _SensorInfo.AddColumn("Value", 60);
ArrayCtrl::Column & c2 = _SensorInfo.AddColumn("Info", 100);
c1.HeaderTab().SetAlign(ALIGN_CENTER);
c2.HeaderTab().SetAlign(ALIGN_CENTER);
c1.HeaderTab().SetFont(StdFont().Bold());
c2.HeaderTab().SetFont(StdFont().Bold());
c1.HeaderTab().SetInk(Cyan());
c2.HeaderTab().SetInk(Cyan());
c1.HeaderTab().SetPaper(Yellow()); // this does not work
c2.HeaderTab().SetPaper(Yellow()); // this does not work
_SensorInfo.NoTrack();
_SensorInfo.Add(1, "46.0 psig");
_SensorInfo.Add(2, "2000.0 sccm");
_SensorInfo.SetReadOnly();
Add(_SensorInfo.SizePos());
}
~ArrayCtrlTest() {}
private:
ArrayCtrl _SensorInfo;
};
GUI_APP_MAIN
{
ArrayCtrlTest().Run();
}
|
|
|
|
|
Re: Problem w/ HeaderCtrl.SetPaper() in my app. [message #14469 is a reply to message #14462] |
Wed, 27 February 2008 01:18 |
jlfranks
Messages: 57 Registered: May 2007 Location: Houston, TX, USA
|
Member |
|
|
This failed to compile for me.
HeaderCtrl.cpp
/home/jfranks/upp/uppsrc/CtrlLib/HeaderCtrl.cpp: In member function ‘void Upp::HeaderCtrl::Column::Paint(bool&, Upp::Draw&, int, int, int, int, bool, bool, bool)’:
/home/jfranks/upp/uppsrc/CtrlLib/HeaderCtrl.cpp:74: error: operands to ?: have different types
|
|
|
|
|
Goto Forum:
Current Time: Wed May 15 04:27:42 CEST 2024
Total time taken to generate the page: 0.04100 seconds
|