Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Jean-Pierre Hermans
Added: May 24, 2021 3:32 AM
Modified: May 24, 2021 3:41 AM
Views: 382
Tags: button tkinter
  1. from tkinter import *
  2.  
  3. root = Tk()
  4.  
  5. root.geometry("400x300")
  6. root.resizable(True, True)
  7.  
  8. one = Label(root, text="One", bg="red", fg="yellow")
  9. one.pack()
  10. two = Label(root, text="Two", bg="green", fg="black")
  11. two.pack(fill=X)
  12. three = Label(root, text="Three", bg="blue", fg="white")
  13. three.pack(fill=Y, side="left")
  14.  
  15. root.mainloop()
Comments disabled