Home » Community » Newbie corner » Background of static frames
Re: Background of static frames [message #31374 is a reply to message #31353] |
Fri, 25 February 2011 23:23   |
 |
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
Hi dolik.rce,
Thanks for your reply !
Ok, here is a small layout :
LAYOUT(Result, 376, 80)
ITEM(Label, lblResult, SetAlign(ALIGN_CENTER).LeftPosZ(8, 360).TopPosZ(8, 23))
ITEM(StaticFrame, frmResult, LeftPosZ(8, 360).TopPosZ(8, 24))
ITEM(Button, cancel, SetLabel(t_("+ Details ...")).Tip(t_("Click to see the ")).LeftPosZ(296, 72).TopPosZ(36, 15))
ITEM(Button, ok, SetLabel(t_("Ok")).LeftPosZ(156, 64).TopPosZ(48, 24))
END_LAYOUT
This is compiling and working well. Now, I want a colored frame. I make it easily with the layout graphic editor, and the layout becomes this :
LAYOUT(Result, 376, 80)
ITEM(Label, lblResult, SetAlign(ALIGN_CENTER).LeftPosZ(8, 360).TopPosZ(8, 23))
ITEM(StaticFrame, frmResult, SetBackground(LtGreen).LeftPosZ(8, 360).TopPosZ(8, 24))
ITEM(Button, cancel, SetLabel(t_("+ Details ...")).Tip(t_("Click to see the ")).LeftPosZ(296, 72).TopPosZ(36, 15))
ITEM(Button, ok, SetLabel(t_("Ok")).LeftPosZ(156, 64).TopPosZ(48, 24))
END_LAYOUT
There is only the SetBackground(LtGreen) added, I repeat that it was made automatically by the graphic editor. But when I compile, I get this error :
main.cpp
In file included from /home/joseph/upp/uppsrc/CtrlCore/lay.h:36,
from /home/joseph/upp/MyApps/gXTM/gXTM.h:11,
from /home/joseph/upp/MyApps/gXTM/main.cpp:9:
/home/joseph/upp/MyApps/gXTM/gXTM.lay: In function ‘void InitLayout(Upp::Ctrl&, L&, D&, Result__layid&) [with L = WithResult<Upp::TopWindow>, D = WithResult<
Upp::TopWindow>]’:
/home/joseph/upp/uppsrc/CtrlCore/TopWindow.h:239: instantiated from ‘void Upp::CtrlLayout(T&) [with T = WithResult<Upp::TopWindow>]’
/home/joseph/upp/uppsrc/CtrlCore/TopWindow.h:247: instantiated from ‘void Upp::CtrlLayout(T&, const char*) [with T = WithResult<Upp::TopWindow>]’
/home/joseph/upp/uppsrc/CtrlCore/TopWindow.h:253: instantiated from ‘void Upp::CtrlLayoutOK(T&, const char*) [with T = WithResult<Upp::TopWindow>]’
/home/joseph/upp/uppsrc/CtrlCore/TopWindow.h:267: instantiated from ‘void Upp::CtrlLayoutOKCancel(T&, const char*) [with T = WithResult<Upp::TopWindow>]’
/home/joseph/upp/MyApps/gXTM/main.cpp:127: instantiated from here
/home/joseph/upp/MyApps/gXTM/gXTM.lay:24: error: ‘class StaticFrame’ has no member named ‘SetBackground’
gXTM: 1 file(s) built in (0:02.87), 2874 msecs / file, duration = 2877 msecs, parallelization 0%
I tried also Background, but I get the same message. Same also if I try to do that in the C++ code, either with SetBackground as Background. None of those functions appear in the assist++ for StaticFrame class...
I don't think that it could be related to the use of CtrlLayoutOKCancel... Anyway, I tried also with CtrlLayout, and the "StaticFrame has no member named ..." was still there...
|
|
|
Goto Forum:
Current Time: Tue Apr 29 00:39:33 CEST 2025
Total time taken to generate the page: 0.04488 seconds
|