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
Adding set of controls in a tab [message #22530] Fri, 24 July 2009 15:06 Go to next message
bianconejo is currently offline  bianconejo
Messages: 11
Registered: March 2009
Promising Member
Hi guys!

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

Thanx !



Re: Adding set of controls in a tab [message #22532 is a reply to message #22530] Fri, 24 July 2009 15:45 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3352
Registered: August 2008
Senior Veteran
Hello bianconejo

Sorry Smile Could you explain a little bit more ?

Now it is summer and my brain with the mercury over 30ºC does not work 100%...

Best regards
Koldo


Best regards
Iñaki
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 next 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
Re: Adding set of controls in a tab [message #22536 is a reply to message #22530] Fri, 24 July 2009 22:43 Go to previous message
bianconejo is currently offline  bianconejo
Messages: 11
Registered: March 2009
Promising Member
Thanx a lot Honza it works perfectly !!!

i tried this way, following the tabdialog exemple but stalled for a while.

I forgot:
 	CtrlLayout(tab1);


this helps indeed....

Thanx again Honza !!
Previous Topic: Layout designer and Upp namespace
Next Topic: Incorrect default font settings in Layout Designer
Goto Forum:
  


Current Time: Tue Mar 19 11:57:42 CET 2024

Total time taken to generate the page: 0.01770 seconds