ForTest Posted September 6, 2016 Report Posted September 6, 2016 Hi, i have a question about the navigation throught menus I have for example three menus : A() , B() , C() Whan i call for example the function A() it performs : a full clear screen (my primitive for my screen) set invisible every widget on menu B (gwinSetVisible) set invisible every widget on menu C (gwinSetVisible) destroy every widget on menu A (gwinDestroy) create every widget on menu A (gwinLabelCreate) set visible every widget on menu A(gwinSetVisible) redraw every widget on menu A (gwinRedraw) Whan i call the function B() it performs : a full clear screen (my primitive for my screen) set invisible every widget on menu C (gwinSetVisible) set invisible every widget on menu A (gwinSetVisible) destroy every widget on menu B (gwinDestroy) create every widget on menu B (gwinLabelCreate) set visible every widget on menu B(gwinSetVisible) redraw every widget on menu B (gwinRedraw) etc... It works, but it's very slow. I'm sure this is not the best method. I know for example that containers can perform destroy actions on all his child. Now i ask what are the right actions to perform a simple navigation throught menus and if exists examples about that Thank you
inmarket Posted September 7, 2016 Report Posted September 7, 2016 Yes containers are what you want to use. Setting the visibility of a container controls the visibility of every child control on that container (and with optimised redrawing). Destroying a container will automatically destroy all the children controls on that container.
Joel Bodenmann Posted September 11, 2016 Report Posted September 11, 2016 As @inmarket mentioned, using containers is the recommended, easiest & most optimized way of achieving what you want to do. Depending on your use case, this might be interesting too:
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now