<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        基于wxpython實現的windowsGUI程序實例

        來源:懂視網 責編:小采 時間:2020-11-27 14:41:20
        文檔

        基于wxpython實現的windowsGUI程序實例

        基于wxpython實現的windowsGUI程序實例:本文實例講述了基于wxpython實現的windows GUI程序。分享給大家供大家參考。具體如下: # using a wx.Frame, wx.MenuBar, wx.Menu, wx.Panel, wx.StaticText, wx.Button, # and a wx.BoxSizer to show a rudi
        推薦度:
        導讀基于wxpython實現的windowsGUI程序實例:本文實例講述了基于wxpython實現的windows GUI程序。分享給大家供大家參考。具體如下: # using a wx.Frame, wx.MenuBar, wx.Menu, wx.Panel, wx.StaticText, wx.Button, # and a wx.BoxSizer to show a rudi

        本文實例講述了基于wxpython實現的windows GUI程序。分享給大家供大家參考。具體如下:

        # using a wx.Frame, wx.MenuBar, wx.Menu, wx.Panel, wx.StaticText, wx.Button, 
        # and a wx.BoxSizer to show a rudimentary wxPython Windows GUI application
        # wxPython package from: http://prdownloads.sourceforge.net/wxpython/
        # I downloaded: wxPython2.5-win32-ansi-2.5.3.1-py23.exe
        # if you have not already done so install the Python compiler first
        # I used Python-2.3.4.exe (the Windows installer package for Python23) 
        # from http://www.python.org/2.3.4/
        # tested with Python23 vegaseat 24jan2005
        import wx
        class Frame1(wx.Frame):
         # create a simple windows frame (sometimes called form)
         # pos=(ulcX,ulcY) size=(width,height) in pixels
         def __init__(self, parent, title):
         wx.Frame.__init__(self, parent, -1, title, pos=(150, 150), size=(350, 250))
         # create a menubar at the top of the user frame
         menuBar = wx.MenuBar()
         # create a menu ... 
         menu = wx.Menu()
         # ... add an item to the menu
         # 	Alt-X creates an accelerator for Exit (Alt + x keys)
         # the third parameter is an optional hint that shows up in 
         # the statusbar when the cursor moves across this menu item
         menu.Append(wx.ID_EXIT, "E&xit	Alt-X", "Exit the program")
         # bind the menu event to an event handler, share QuitBtn event
         self.Bind(wx.EVT_MENU, self.OnQuitButton, id=wx.ID_EXIT)
         # put the menu on the menubar
         menuBar.Append(menu, "&File")
         self.SetMenuBar(menuBar)
         # create a status bar at the bottom of the frame
         self.CreateStatusBar()
         # now create a panel (between menubar and statusbar) ...
         panel = wx.Panel(self)
         # ... put some controls on the panel
         text = wx.StaticText(panel, -1, "Hello World!")
         text.SetFont(wx.Font(24, wx.SCRIPT, wx.NORMAL, wx.BOLD))
         text.SetSize(text.GetBestSize())
         quitBtn = wx.Button(panel, -1, "Quit")
         messBtn = wx.Button(panel, -1, "Message")
         # bind the button events to event handlers
         self.Bind(wx.EVT_BUTTON, self.OnQuitButton, quitBtn)
         self.Bind(wx.EVT_BUTTON, self.OnMessButton, messBtn)
         # use a sizer to layout the controls, stacked vertically
         # with a 10 pixel border around each
         sizer = wx.BoxSizer(wx.VERTICAL)
         sizer.Add(text, 0, wx.ALL, 10)
         sizer.Add(quitBtn, 0, wx.ALL, 10)
         sizer.Add(messBtn, 0, wx.ALL, 10)
         panel.SetSizer(sizer)
         panel.Layout()
         def OnQuitButton(self, evt):
         # event handler for the Quit button click or Exit menu item
         print "See you later alligator! (goes to stdout window)"
         wx.Sleep(1) # 1 second to look at message
         self.Close()
         def OnMessButton(self, evt):
         # event handler for the Message button click
         self.SetStatusText('101 Different Ways to Spell "Spam"')
        class wxPyApp(wx.App):
         def OnInit(self):
         # set the title too
         frame = Frame1(None, "wxPython GUI 2")
         self.SetTopWindow(frame)
         frame.Show(True)
         return True
        # get it going ...
        app = wxPyApp(redirect=True)
        app.MainLoop()
        
        

        希望本文所述對大家的Python程序設計有所幫助。

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        基于wxpython實現的windowsGUI程序實例

        基于wxpython實現的windowsGUI程序實例:本文實例講述了基于wxpython實現的windows GUI程序。分享給大家供大家參考。具體如下: # using a wx.Frame, wx.MenuBar, wx.Menu, wx.Panel, wx.StaticText, wx.Button, # and a wx.BoxSizer to show a rudi
        推薦度:
        標簽: Windows 實例 gui
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 好猛好深好爽好硬免费视频| 又粗又硬又大又爽免费视频播放| 亚洲国产成人手机在线观看| 亚洲国产高清在线| 亚洲综合精品网站在线观看| 免费A级毛片无码A| 国产亚洲精品拍拍拍拍拍| 久久久久亚洲av成人无码电影 | 成人A毛片免费观看网站| 你懂的免费在线观看| 99在线观看视频免费| 亚洲欧洲免费无码| 国产成人精品免费直播| 亚洲av高清在线观看一区二区| 久久亚洲国产成人影院网站| 久久久久亚洲AV成人无码| 亚洲日韩一区二区一无码| 无遮挡国产高潮视频免费观看| 黄网站色视频免费在线观看的a站最新| 日本免费大黄在线观看| 日韩毛片无码永久免费看| 久久亚洲精品无码播放| 亚洲美女视频网站| 美女被艹免费视频| 一级毛片免费播放| 国产人妖ts在线观看免费视频| 亚洲中文久久精品无码ww16| 亚洲一区在线视频观看| 一区在线免费观看| 国产大片免费网站不卡美女| 亚洲精品天堂成人片?V在线播放| 亚洲综合一区二区精品久久| 免费人成视频在线播放| 最近免费中文字幕高清大全 | 久久精品国产亚洲AV麻豆网站| 亚洲性色AV日韩在线观看| 中文字幕乱码免费看电影| 国产精品久久免费视频| 亚洲精品人成电影网| aaa毛片免费观看| 成人毛片免费观看视频大全|