I was able to capture it in a small sample- it has something to do
with a CheckListBox.
To repro it with the sample below:
0. Run the script
1. Open the 'Breaks' menu and repeatedly type the letter 'a' to scroll
through the results
2. Press 'Enter' key to select an option
3. Open the 'Breaks' menu and type the letter 'a' to verify that
typing no longer works
If someone has any recommendations of where to report this unconfirmed
bug I'd be happy to copy this information somewhere else.
from wx._controls import CheckListBox
from wx._core import App, MenuBar, Menu, ITEM_NORMAL, EVT_MENU
from wx._windows import Frame
class MyFrame(Frame):
items = ('A0', 'A1', 'A2', 'A3')
def __init__(self):
Frame.__init__(self, None, -1, "Menu test", size=(300, 150))
menu_bar = MenuBar()
menu_0 = Menu()
self._set_items(menu_0)
menu_bar.Append(menu_0, "Breaks")
self.SetMenuBar(menu_bar)
CheckListBox(self, choices=self.items)
def _repop_menu_items(self, event):
menu_bar = self.GetMenuBar()
menu = menu_bar.GetMenu(0)
for item in menu.GetMenuItems():
menu.Remove(item.GetId())
self._set_items(menu)
def _set_items(self, menu):
for item in self.items:
menu_item = menu.Append(-1, item, item, ITEM_NORMAL)
self.Bind(EVT_MENU, self._repop_menu_items, menu_item)
if __name__ == "__main__":
app = App(redirect=False)
frame = MyFrame()
frame.Show()
app.SetTopWindow(frame)
app.MainLoop()