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'): Specifying the ...

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.