wxPython学习

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

 

一个简单的实例:

#!/usr/bin/python
import wx
class 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))屏幕中央
 

 

posted @ 2016-09-07 09:28  chencesc  阅读(121)  评论(0编辑  收藏  举报