wxpython menu
Python hosting: Host, run, and code Python in the cloud!
Most desktop applications have a window menu. They may look different depending the operating system.
wxPython will make every desktop application look like a native app. If you want the same appearance on every platform consider using another GUI framework.

Related course: Creating GUI Applications with wxPython
wxPython menu
The code below will create a menubar in your wxPython window:
#!/usr/bin/python |
A menu in wxPython is simple a wx.MenuBar().
This menu alone will not do anything, it needs to have several sub-menus such as a File menu. A sub-menu can be created with wx.Menu() which in turn has several items.
Finally, we set the frame’s menubar to the menubar we created.
wxPython has some default ids such as wx.ID_ABOUT and wx.ID_EXIT, which are both just integers. You can define your own ids as we did (101, 102).
Posted in wx
Leave a Reply: