O'Reilly logo

Tkinter GUI Application Development Blueprints - Second Edition by Bhaskar Chaudhary

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

Some common root window options

Now that we are done discussing styling options, let's wrap up with a discussion on some commonly used options for the root window:

Method 

Description

*root.geometry('142x280+150+200')

You can specify the size and location of

a root window by using a string of the

widthxheight + xoffset + yoffset form.

self.root.wm_iconbitmap('mynewicon.ico') OR

self.root.iconbitmap('mynewicon.ico ')

This changes the title bar icon to something

that is different from the default Tk icon.

root.overrideredirect(1)

This removes the root border frame. It hides the frame that contains the minimize, maximize, and close buttons.

Let's explain these styling options in more detail:

  • root.geometry('142x280+150+200') ...

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