2019-09-16 12:01 AM
Hi
I have a container (menuScreen) with some buttons in it and I want to change to a screenview depending on the buttons. I'm accesing this container (menuScreen) from another container that is added in every screen in the designer.
Is it possible to change to a screen from this container (menuScreen)?
Regards
Dejan
Solved! Go to Solution.
2019-09-16 03:53 AM
Hi @Dejan Nedeljkovic,
Sure. Just configure the container to take a callback with a handler that you define in your views. In that handler, since you are now in the view, you can then transition directly to another screen or maybe go through the presenter or however you want to do that.
static_cast<FrontendApplication*>(Application::getInstance())->gotoMyScreen();
/Martin
2019-09-16 03:53 AM
Hi @Dejan Nedeljkovic,
Sure. Just configure the container to take a callback with a handler that you define in your views. In that handler, since you are now in the view, you can then transition directly to another screen or maybe go through the presenter or however you want to do that.
static_cast<FrontendApplication*>(Application::getInstance())->gotoMyScreen();
/Martin
2019-09-16 03:59 AM
Hi @Martin KJELDSEN
Thanks for the fast response. I've jsut done it with a callback and then transition in the handler to another screen.
It's working how it should.
Now I'm having another problem, that the container ist not the foremost. The container is displaying behind textAreas.
How can I set the container to the front?
Regards
Dejan
2019-09-16 04:32 AM
Hi @Dejan Nedeljkovic,
No problem. You can configure the z-order of widgets in the designer by simply dragging them up and down. In this application, the green box is the background (Furthest down in the widget tree).
2019-09-16 04:47 AM
Thank you, that helped.
Regards
Dejan
2019-09-17 04:57 AM
Hi @Martin KJELDSEN
In one of my screen transitions I have default handler.
If I'm in my TopSlideMenu and goto to other screen and after I want to go back to home screen I have default handler. My "goto's" I did in two ways, both I have the same:
application().gotoScreen_HomeScreenNoTransition();
or
static_cast<FrontendApplication*>Application::getInstance())->gotoScreen_HomeScreenNoTransition();
Any idea what is happening?
Regards.
2019-09-17 06:52 AM
Hi @eng23,
Sorry, but can you rephrase? i'm not sure i quite understand your issue. Thanks!
/Martin
2019-09-17 07:20 AM
Hi @Martin KJELDSEN
Yes sorry I wasn't clear in my explanation.
Well I've implemented a TopSlideMenu in my home screen where I have a configuration icon. When I click on configuration icon I call another screen by this command:
application().gotoScreen_ConfigScreenSlideTransitionNorth();
In this new screen I added a Home Icon to go back to my home screen. When I click on this the code stops and go to Default Handler. The command in configuration screen:
application().gotoScreen_HomeScreenNoTransition();
I hope know it is understandable.
Regards.
2019-09-17 11:41 AM
Does this work in the simulator?