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   |
|
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 ), 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
Honza
|
|
|
|
Goto Forum:
Current Time: Sun May 11 09:01:04 CEST 2025
Total time taken to generate the page: 0.00932 seconds
|