Hide/Show wxMenu items...

Hi...
Is there a simple way to hide/show menu items like using
enable(True/False)....
.. or do I have to use "Remove" and then "Insert" when I want them to be
visible again?

I'm using latest wxPython (2.8.1)

Thanx
Holmis

Hi Steve,

I don’t think that creating menus is such a resource intensive action.
Just make a method that will take some parameters and recreate the entire menu based on those parameters. after that simply replace the old menu with the new one.

Peter.

···

On 2/12/07, Stefan Holmgren stefan.holmgren@accalon.se wrote:

Hi…
Is there a simple way to hide/show menu items like using
enable(True/False)…
… or do I have to use “Remove” and then “Insert” when I want them to be
visible again?

I’m using latest wxPython (
2.8.1)

Thanx
Holmis


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org


There is NO FATE, we are the creators.

Hi Stefan,

Stefan Holmgren wrote:

Hi...
Is there a simple way to hide/show menu items like using enable(True/False)....
  

wxMenu::Enable
void Enable(int id, const bool enable)
Enables or disables (greys out) a menu item.

.. or do I have to use "Remove" and then "Insert" when I want them to be visible again?
  

Removing/hiding and inserting is in my view confusing to the user.

Werner