How do you tell if wx.Menu instance is Visible

I have an application that instantiates a wx.Menu.

I do some dynamic updates to some of the menu items within that menu
instance. I want to avoid doing these updates if the wx.Menu isn't
visible to the user. I can't seem to find how to tell if the menu
instance is currently active (i.e. being shown to the user). Is there
a way?

Thanks,

-Rishi

There probably isn't a way to do exactly what you ask, but if you are just wanting to do things like enable/disable, check/uncheck or change labels then using EVT_UPDATE_UI event handlers will help you do that. For menus the EVT_UPDATE_UI handlers associated with the items are called just before the menu is shown.

···

On 12/22/11 2:27 PM, Rish wrote:

I have an application that instantiates a wx.Menu.

I do some dynamic updates to some of the menu items within that menu
instance. I want to avoid doing these updates if the wx.Menu isn't
visible to the user. I can't seem to find how to tell if the menu
instance is currently active (i.e. being shown to the user). Is there
a way?

--
Robin Dunn
Software Craftsman