Skip to Content
Python GUI Programming with Tkinter
book

Python GUI Programming with Tkinter

by Alan D. Moore
May 2018
Beginner to intermediate content levelBeginner to intermediate
452 pages
11h 26m
English
Packt Publishing
Content preview from Python GUI Programming with Tkinter

Building the Linux menu

Our GenericMenu class is pretty close to the Gnome HIG, but there is one change to be made:  our Options menu doesn't really belong; rather, we need to split its items into two categories.

The autofill options, since they change the way data is entered in the form, belong in an edit menu. The font and theme options, since they only change the appearance of the application and not the actual data, belong in a view menu.

Let's make the modifications necessary to create our Linux menu:

  1. Start the class by subclassing GenericMainMenu and overriding the _build_menu() method:
class LinuxMainMenu(GenericMainMenu):
    def _build_menu(self):
  1. Once again, copy in the code from the parent and edit what needs to be changed.
  2. First, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python GUI Programming with Tkinter - Second Edition

Python GUI Programming with Tkinter - Second Edition

Alan D. Moore

Publisher Resources

ISBN: 9781788835886Supplemental Content