fork download
  1. import wx
  2.  
  3. class MyFrame(wx.Frame):
  4. def __init__(self):
  5. wx.Frame.__init__(self, None, -1, "ICT-TOOL", size=(1000,500))
  6. panel = wx.Panel(self)
  7.  
  8.  
  9.  
  10. button_1 = wx.Button(panel, label="test")
  11. button_2 = wx.Button(panel , label="aaa")
  12. button_3 = wx.Button(panel , label='bbb')
  13. layout = wx.GridSizer(rows=3 , cols=3 , gap=(0 , 0))
  14. layout.Add(button_1 , flag=wx.EXPAND | wx.ALL , border=40)
  15. layout.Add(button_2 , flag=wx.EXPAND | wx.ALL , border=40)
  16. layout.Add(button_3 , flag=wx.EXPAND | wx.ALL , border=40)
  17. self.Bind(wx.EVT_BUTTON , self.testbutton , button_1)
  18. def testbutton(self, event):
  19. import txt
  20.  
  21. if __name__ == '__main__':
  22. app = wx.PySimpleApp()
  23. MyFrame().Show()
  24. app.MainLoop()
Runtime error #stdin #stdout #stderr 0.04s 9368KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
ImportError: No module named 'wx'