Tkinter: Difference between revisions

294 bytes added ,  6 years ago
Line 48:
 
= 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 =