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 » Understanding Frames
Re: Understanding Frames [message #3860 is a reply to message #3859] Sun, 02 July 2006 13:13 Go to previous messageGo to previous message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
forlano wrote on Sun, 02 July 2006 11:18

I've translated the Werner's example in the designer language. Below is the result. StaticRect can be colored. Instead LabelBox seems cannot be colored... at least not directly... maybe there is an indirect way... again via Display?... Rolling Eyes

Luigi

#include <CtrlLib/CtrlLib.h>

#define LAYOUTFILE <staticrect/layout.lay>
#include <CtrlCore/lay.h>

class App : public WithFramesLayout<TopWindow> {
public:

	typedef App CLASSNAME;

	App();
};

App::App()
{
	CtrlLayout(*this, "Resize window to see what happens");
	top_left_to_right.Color(Red);
	bottom_left.Color(Green);
	bottom_right.Color(Blue);
	this -> Sizeable();
}

GUI_APP_MAIN
{
    App app;
    app.Run();
}


////////////// layout.lay ////////////////
LAYOUT(FramesLayout, 605, 451)
ITEM(StaticRect, bottom_right, RightPosZ(13, 466).BottomPosZ(8, 377))
ITEM(StaticRect, bottom_left, HSizePosZ(9, 478).BottomPosZ(8, 377))
ITEM(StaticRect, top_left_to_right, HSizePosZ(9, 13).VSizePosZ(8, 384))
END_LAYOUT




Much better than my example code:

- The window doesn't flicker when being resized.
- No "resizing-to-minimum-problem".

Unfortunately I haven't been able so far to find out what makes the difference. It seems to be buried in the internal handling of CtrlLayout.

Werner
 
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: Mapping button to CALLBACK
Next Topic: scrolling without Frame and wrapping Ctrl?
Goto Forum:
  


Current Time: Sat Sep 06 22:15:15 CEST 2025

Total time taken to generate the page: 0.12396 seconds