V
V
valisikus2020-08-31 02:51:55
Python
valisikus, 2020-08-31 02:51:55

How to make Frame to frame with python Tkinter?

I want to write code with repeated repetition of squares in Python, but I ran into a problem, frames are not displayed in other frames. How to fix?

from tkinter import *

root = Tk()
root["bg"] = "gray"
root.geometry("550x550")

a = Frame(root, width= 1000, height = 1000)
a["bg"]= "red"
a.pack()
b= Frame(a, wiidth= 900, height= 900)
b["bg"] = "orange"
b.pack()

root.mainloop()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sprmax, 2020-08-31
@sprmax

Use recursion

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question