[READ-ONLY] Mirror of https://github.com/shuuji3/wxpython-getting-started.
0

Configure Feed

Select the types of activity you want to include in your feed.

wxpython-getting-started / texteditor.py
730 B 23 lines
1#!/usr/bin/env python3 2import wx 3class MainWindow(wx.Frame): 4 '''We simply derive a new class of frame''' 5 def __init__(self, parent, title): 6 wx.Frame.__init__(self, parent, title=title, size=(200, 300)) 7 self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE) 8 self.CreateStatusBar() 9 10 filemenu = wx.Menu() 11 filemenu.Append(wx.ID_ABOUT, '&About', 'About this program') 12 filemenu.AppendSeparator() 13 filemenu.Append(wx.ID_EXIT, 'E&xit', 'Terminate the program') 14 15 menu_bar = wx.MenuBar() 16 menu_bar.Append(filemenu, '&File') 17 self.setMenuBar(menu_bar) 18 19 self.Show(True) 20 21app = wx.App(False) 22frame = MainWindow(None, 'Simple editor') 23app.MainLoop()