Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (19.9k points)

Hi. I am using the following code, but the window is too small. I want to make the window big in size. How can I do it?

from Tkinter import *

root = Tk()

Label(root, text="Red Sun", bg="red", fg="white").pack()

Label(root, text="Green Grass", bg="green", fg="black").pack()

Label(root, text="Blue Sky", bg="blue", fg="white").pack()

1 Answer

0 votes
by (25.1k points)

To do this you would need to call the geometry method and pass in the string in the 'widthxheight' format. This will change the window size but would not change it children's size.

root.geometry('500*500')

Here's a video to help you get a deepre understanding aboiut python an it's modules:

Related questions

Browse Categories

...