self.CreateStatusBar()
self.SetStatusText("This is the statusbar")
+ tc = wxTextCtrl(self, -1, """
+A bunch of bogus menus have been created for this frame. You
+can play around with them to see how they behave and then
+check the source for this sample to see how to implement them.
+""", style=wxTE_READONLY|wxTE_MULTILINE)
+
# Prepare the menu bar
menuBar = wxMenuBar()
# 1st menu from left
menu1 = wxMenu()
- menu1.Append(101, "Mercury", "This the text in the Statusbar")
- menu1.Append(102, "Venus", "")
- menu1.Append(103, "Earth", "You may select Earth too")
+ menu1.Append(101, "&Mercury", "This the text in the Statusbar")
+ menu1.Append(102, "&Venus", "")
+ menu1.Append(103, "&Earth", "You may select Earth too")
menu1.AppendSeparator()
- menu1.Append(104, "Exit", "Close this frame")
+ menu1.Append(104, "&Close", "Close this frame")
# Add menu to the menu bar
menuBar.Append(menu1, "&Planets")
EVT_MENU(self, 101, self.Menu101)
EVT_MENU(self, 102, self.Menu102)
EVT_MENU(self, 103, self.Menu103)
- EVT_MENU(self, 104, self.OnCloseWindow)
+ EVT_MENU(self, 104, self.CloseWindow)
EVT_MENU(self, 201, self.Menu201)
EVT_MENU(self, 202, self.Menu202)
def Menu103(self, event):
self.log.write('Welcome to the Earth\n')
- def OnCloseWindow(self, event):
- self.Destroy()
+ def CloseWindow(self, event):
+ self.Close()
def Menu201(self, event):
self.log.write('Chemical element number 1\n')
def runTest(frame, nb, log):
win = MyFrame(frame, -1, log)
frame.otherWin = win
- win.Show(true)
+ win.Show(True)
#-------------------------------------------------------------------