首页 > 代码库 > wxPython学习

wxPython学习

http://www.cnblogs.com/coderzh/archive/2008/11/23/1339310.html

 

一个简单的实例:

#!/usr/bin/pythonimport wxclass MyFrame(wx.Frame):    """ We simply derive a new class of Frame. """    def __init__(self, parent, title):        wx.Frame.__init__(self, parent, title=title, size=(200,100))         self.Show(True)app = wx.App(False)frame = MyFrame(None, hello world)app.MainLoop()

关于   wx.Frame.__init__

 

wx.Frame.__init__(self, parent, title=title, size=(200,100))
wx.Frame.__init__(self, parent, id, title, size=(200,100))
wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, wx.Size=(200,100))屏幕中央
 

 

wxPython学习