[...]
menu = wxMenu(...
menu.Insert(0, 100, "the_name")
[...]
And this:
menu.FindItem("the_name")
returns -1 instead of 100. Everything is ok if item label contains no "_"
characters. I'm wondering if this is a bug in WX or I've misunderstood
something.
returns -1 instead of 100. Everything is ok if item label contains no "_"
characters. I'm wondering if this is a bug in WX or I've misunderstood
something.
Try "escaping" the with an extra underscore. (menu.FindItem("the__name")). Does that work?
[...]
menu = wxMenu(...
menu.Insert(0, 100, "the_name")
[...]
And this:
menu.FindItem("the_name")
returns -1 instead of 100. Everything is ok if item label contains no "_"
characters. I'm wondering if this is a bug in WX or I've misunderstood
something.
The underscore is used in the menu items in gtk the same as the & is used on MSW, it designates which character is the menu item's mnemonic. I would have expected FindItem to work around this difference and do the right thing so please enter a bug report about it.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!