wx (not responding)

N

ngangsia akumbo

When i run this code on my pc it actually runs but signals that the app is not responding.


import wx

class Example(wx.Frame):

def __init__(self, *args, **kwargs):
super(Example, self).__init__(*args, **kwargs)


self.InitUI()



def InitUI(self):


menubar = wx.MenuBar()
fileMenu = wx.Menu()
fitem = fileMenu.Append(wx.ID_EXIT, 'QUIT', 'Quit application')
menubar.Append(fileMenu, '&File')

self.Bind(wx.EVT_MENU, self.OnQuit, fitem)


self.SetSize((300, 200))
self.SetTitle('Simple menu')
self.Center()
self.Show(True)



def OnQuit(self, e):
self.Close()



def main():
ex = wx.App()
Example(None)
ex.Mainloop()


if __name__ == "__main__":
main()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top