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 » U++ Widgets - General questions or Mixed problems » two state button via layout designer
Re: two state button via layout designer [message #3457 is a reply to message #3453] Thu, 25 May 2006 22:27 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1207
Registered: March 2006
Location: Italy
Senior Contributor
qwerty wrote on Thu, 25 May 2006 21:09

sure

clean new app:

LAYOUT(MyAppLayout, 200, 100)
	ITEM(Option, oMyOption, SetLabel(t_("someName")).ThreeState(true).LeftPosZ(60, 42).TopPosZ(16, 15))
END_LAYOUT


compiler out:
----- CtrlLib ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (1 / 9)
----- CtrlCore ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (2 / 9)
----- RichText ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (3 / 9)
----- Draw ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (4 / 9)
----- Core ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (5 / 9)
----- Image ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (6 / 9)
----- plugin\png ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (7 / 9)
----- plugin\z ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (8 / 9)
----- MyApp ( GUI MAIN GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (9 / 9)
main.cpp
C:/MyApps/MyApp/MyApp.lay: In function `void InitLayout(Ctrl&, L&, D&, MyAppLayout__layid&) [with L = MyApp, D = MyApp]':
	
C:/upp/uppsrc/CtrlCore/TopWindow.h:210:   instantiated from `void CtrlLayout(T&) [with T = MyApp]'
C:/upp/uppsrc/CtrlCore/TopWindow.h:218:   instantiated from `void CtrlLayout(T&, const char*) [with T = MyApp]'
C:\MyApps\MyApp\main.cpp:7:   instantiated from here
C:/MyApps/MyApp/MyApp.lay:2: error: 'class Pusher' has no member named 'ThreeState'
MyApp: 1 file(s) built in (0:05.73), 5735 msecs / file, duration = 5735 msecs, parallelization 0%

There were errors. (0:06.00)

have any idea?

It is as suspected... Look this line:
C:/MyApps/MyApp/MyApp.lay:2: error: 'class Pusher' has no member named 'ThreeState'

In it the is the answer: SetLabel() return a class of type Pusher to which you can't apply the method .ThreeState().
The solution: simply remove .ThreeState in that line and use
	ITEM(Option, oMyOption, SetLabel(t_("someName")).LeftPosZ(60, 42).TopPosZ(16, 15))

Then in the constructor add the line:
oMyOption.ThreeState();

and the threestate button will appear.
If you do not use SetLabel() (empty label), then the you can apply the ThreeState() method directly in the designer.
Luigi
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: simple text_edit
Next Topic: Stripping unnecessary classes
Goto Forum:
  


Current Time: Sun Jun 08 18:44:09 CEST 2025

Total time taken to generate the page: 0.04403 seconds