wxpython menu callback stackoverflow
def menuclick(e):
print(menu.FindItemById(e.Id).Label)
wxpython menu callback stackoverflow
def menuclick(e):
print(menu.FindItemById(e.Id).Label)
wxpython menu callback stackoverflow
import wx
app = wx.App(False)
frame = wx.Frame(None)
menuBar = wx.MenuBar()
menu = wx.Menu()
menuBar.Append(menu, "&Menu")
frame.SetMenuBar(menuBar)
for name in ['foo','bar','baz']:
menuitem = menu.Append(-1,"&"+name,name)
def menuclick(e):
print(name)
frame.Bind(wx.EVT_MENU, menuclick, menuitem)
frame.Show(True)
app.MainLoop()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us