Doing it in style

So far, we have relied on Tkinter to provide specific platform-based styling for our widgets. However, you can specify your own styling of widgets, such as their color, font size, border width, and relief. A brief introduction of styling features that are available in Tkinter is covered in the following section.

You may recall that we can specify the widget options at the time of its instantiation, as follows:

my_button = Button(parent, **configuration options)

Alternatively, you can specify the widget options by using configure () in the following way:

my_button.configure(**options)

The styling options are also specified as options to the widgets either at the time of creating the widgets, or later by using the configure option. ...

Get Tkinter GUI Application Development Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.