]>
Commit | Line | Data |
---|---|---|
be05b434 RD |
1 | import wx |
2 | ||
3 | class MyFrame(wx.Frame): | |
4 | def __init__(self): | |
5 | wx.Frame.__init__(self, None, -1, "Simple Menu Example") | |
6 | p = wx.Panel(self) | |
7 | menuBar = wx.MenuBar() | |
8 | menu = wx.Menu() | |
9 | menuBar.Append(menu, "Left Menu") | |
10 | menu2 = wx.Menu() | |
11 | menuBar.Append(menu2, "Middle Menu") | |
12 | menu3 = wx.Menu() | |
13 | menuBar.Append(menu3, "Right Menu") | |
14 | self.SetMenuBar(menuBar) | |
15 | ||
16 | if __name__ == "__main__": | |
17 | app = wx.PySimpleApp() | |
18 | frame = MyFrame() | |
19 | frame.Show() | |
20 | app.MainLoop() | |
21 | ||
22 |