Advertisement
here2share

# Tk_offset_padding.py

Dec 29th, 2021
1,270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. # Tk_offset_padding.py
  2.  
  3. from tkinter import *
  4.  
  5. root = Tk()
  6. root.title('Offset Padding')
  7. root.geometry("600x300")
  8. root.config(bg="blue")
  9.  
  10. # Create a label
  11. my_label = Label(root, text=" Label A ",
  12.     bg="white",
  13.     fg="black",
  14.     font=("Helvtica", 40))
  15.  
  16. my_label.grid(row=0, column=0,
  17.     pady=50,
  18.     padx=(30,10))
  19.  
  20. # Create a second label
  21. my_label2 = Label(root, text=" Label B ",
  22.     bg="white",
  23.     fg="black",
  24.     font=("Helvtica", 40))
  25.  
  26. my_label2.grid(row=0, column=1)
  27.  
  28.  
  29. root.mainloop()
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement