Home » Community » Newbie corner » Multi Layout App
Re: Multi Layout App [message #37542 is a reply to message #37519] |
Mon, 15 October 2012 19:54   |
|
Hi nejnio
While it is possible to switch layouts in a running application, it is not something you would really need very often. In most cases, yours included, it is much easier to just use two windows. It is fairly easy to coordinate them in such way, that only one is visible at any time. E.g.:struct Logged : public WithTestLayout2<TopWindow> {
typedef Logged CLASSNAME;
Logged() {
Title("Logged in").Sizeable();
CtrlLayout(*this);
back <<= THISBACK(Close);
}
};
struct App : public WithTestLayout<TopWindow> {
typedef App CLASSNAME;
void Login(){
Hide();
Logged().Execute();
Show();
}
App() {
Title("Test").Sizeable();
CtrlLayout(*this);
login <<= THISBACK(Login);
}
};
GUI_APP_MAIN{
App().Run();
}; (Full source is included in the attachment.)
Best regards,
Honza
-
Attachment: guitest.zip
(Size: 1.00KB, Downloaded 217 times)
|
|
|
Goto Forum:
Current Time: Tue Jul 08 01:19:22 CEST 2025
Total time taken to generate the page: 0.03527 seconds
|