Jump to content

Recommended Posts

Posted

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

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...