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++ TheIDE » U++ TheIDE: Layout (Forms) Designer » Adding set of controls in a tab
Re: Adding set of controls in a tab [message #22533 is a reply to message #22530] Fri, 24 July 2009 18:45 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

bianconejo wrote on Fri, 24 July 2009 15:06

I wonder if it is possible to link a layout in a TabCtrl or a template defined set of controls ?


If I understand correctly (it's bit colder here Wink ), you want something like this:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;

#define LAYOUTFILE <test/test.lay>
#include <CtrlCore/lay.h>

class mw : public TopWindow{
public:
	typedef mw CLASSNAME;
	mw();
	TabCtrl Tabs;
	WithTab1Layout<ParentCtrl> Tab1;
	WithTab2Layout<ParentCtrl> Tab2;
	/* ... */
};
mw::mw(){
	Tabs.SetRect(0,0,300,200);
	Add(Tabs);
	CtrlLayout(Tab1);
	Tabs.Add(Tab1, "1st Tab");
	CtrlLayout(Tab2);
	Tabs.Add(Tab2, "2nd Tab");
	/* ... */
}
GUI_APP_MAIN{
	mw().Run();
}

Where Tab1Layout and Tab2Layout are layouts specified in test.lay.

Hope I got it right Smile

Honza
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Layout designer and Upp namespace
Next Topic: Incorrect default font settings in Layout Designer
Goto Forum:
  


Current Time: Thu May 09 06:21:32 CEST 2024

Total time taken to generate the page: 0.02141 seconds