The wxWindows docs show a FindMenu method for wxMenuBar, but it isn't in
wxPython 2.3.1. I need to be able to do the equivelant of:
menuId = menubar.FindMenu('File')
so that I can enable and disable the whole menu.
I'm sure there is a simple solution, but I can't see it. I've already done
my daily wxWindows documenation cursing and looked through
c:\python21\wxpython\windows.py
but didn't see anything.
wxMenuBar has the FindMenu method that can find a menu by title.
It returns
the position which you can use with EnableTop.
Not in 2.3.1 Is this a 2.3.2 feature and the docs are ahead of the curve?
There is no method named FindMenu in any of the source files for wxPython
2.3.1
> The wxWindows docs show a FindMenu method for wxMenuBar, but it isn't in
> wxPython 2.3.1. I need to be able to do the equivelant of:
>
> menuId = menubar.FindMenu('File')
>
> so that I can enable and disable the whole menu.
wxMenuBar has the FindMenu method that can find a menu by title. It
returns
the position which you can use with EnableTop.
Oops, I didn't read your original message very well. I see you've already
tried that. FindMenu is in the code already for 2.3.2, but I can't think of
a workaround if it's not there in 2.3.1.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
One workaround is to keep a dictionary of the menu id's { 'File': 222, } and
use that to look them up.
···
On Tuesday 04 September 2001 15:37, you wrote:
Oops, I didn't read your original message very well. I see you've already
tried that. FindMenu is in the code already for 2.3.2, but I can't think
of a workaround if it's not there in 2.3.1.