O'Reilly logo

Tkinter GUI Programming by Example by David Love

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Not Just for Restaurants – All About Menus

To finish off our text editor, we will be adding menus. This includes a menu bar at the top of the application—the kind where you will find options such as file and editand a context menu, which typically appears when the user right-clicks.

Of course, along with the menus will come some new functionality. This includes the ability to control the styling of the application, the color scheme of the TextArea widget, the ability to open and save files, and more!

In this chapter, we will cover:

  • The Menu widget
  • Adding a menu to an application
  • Creating submenus inside a menu
  • Getting file information using the filedialog module
  • Using the colorchooser widget to get a color choice

Let's start with a look ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required