Tkinter: Difference between revisions

Content added Content deleted
Line 48: Line 48:


= Frame =
= Frame =
<syntaxhighlight lang="python">
{{UC}}
import tkinter as tk

root = tk.Tk()

#Frame 1
frame1 = tk.Frame(root, height=300, width=200, background="red")
frame1.grid(row=0, column=0)

# Frame 2
tk.Frame(root, height=300, width=200, background="yellow").grid(row=0, column=1)

root.mainloop()
</syntaxhighlight>


= Buttons =
= Buttons =