What is wx.Menu.Connect()?
I haven't found much documention on the wx.Menu.Connect method am I'm
not sure what it is used for. Considering my home baked method below,
would the Connect() method be the best approach? C++ just confuses me
btw.
I find I do a lot of this for menus:
menuItem = app.Append(ID_EXIT, "E&xit", "Close the entire
application")
self.Bind(wx.EVT_MENU, self.OnExit, menuItem)
So I thought I'd make a new menu class with a method as something
like:
def BindMenuItem(self, menu, id, method, menu, sbTip):
# couldn't come up with a good method name for this.
menuItem = menu.Append( id, menu, sbTip)
self.Bind(wx.EVT_MENU, method, menuItem)
return menuItem
And came across this tutorial for wx.Menus using Connect() in other
languages:
Some language similar to Python
http://brucey.net/programming/blitz/tutorials/prog/en/menustoolbars.html
and here in C++
http://zetcode.com/tutorials/wxwidgetstutorial/menustoolbars/
But the wxPython tutorial version of this webpage doesn't demo the
Connect() method:
http://zetcode.com/wxpython/menustoolbars/