CheckBox Event in wxPython not working -


I'm sorry if this is very simple, but I'm trying to force an event in a checkbox in a menubar Am wxPython For some reason, this will not work! I have tried various methods to print a statement, but when I check the box, nothing happens, is it not properly binding? This is just a simple app that I wrote to display this problem ...

  import wx square frame (wx.frame): def __init __ (self, guardian, id , Title): wx.frame .__ init __ (self, guardian, id, title) panel = wx.Panel (self) menu bar = wx.MenuBar () menu = wx.Menu () self.checkbox = menu.AppendCheckItem ( -1, "Check Me") Menubara (. Menu, 'and check box') self Setmenubar (menubar) self Check the bond (wx.EVT_CHECKBOX, self, check, self check box) def (auto, e): print itself Checkboxes. Check is () app = wx.App () test = frame (none, -1, "test") test.Show () app.MainLoop ()  

I have understood it from the Bind event wx.EVT_CHECKBOX to wx.EVT_MENU .


Comments