How to set window size in Tkinter Python

0 votes

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()
May 9, 2019 in Python by Raj

1 answer to this question.

0 votes

The window size adjustment can be done using geometry method. Add this at the end of the code:


Note: This will only change the window size, the label size will still be the same.

answered May 9, 2019 by Giri

Related Questions In Python

0 votes
1 answer

How to get the size of a string in Python?

If you are talking about the length ...READ MORE

answered Jun 4, 2018 in Python by aryya
• 7,440 points
–1 vote
2 answers

How to find the size of a string in Python?

following way to find length of string  x ...READ MORE

answered Mar 29, 2019 in Python by rajesh
• 1,230 points
0 votes
1 answer

How to get permutations of list or a set in Python?

Permutation is an arrangement of objects in ...READ MORE

answered Jul 11, 2019 in Python by Neel
• 3,020 points
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,483 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,810 points
0 votes
1 answer

Python Tkinter: “‘Label’ unresolved” error

You have imported Tkinter as tk but ...READ MORE

answered May 9, 2019 in Python by Rishi
0 votes
2 answers

Tkinter “module not callable” error.

This error statement TypeError: 'module' object is ...READ MORE

answered Jun 27, 2019 in Python by rahul
• 360 points