Wednesday 13 May 2020

Python Tkinter GUI: Padding tk Label field || Python tk label customize

Python Tkinter GUI: Padding tk Label field || Python tk label ...


Python Tkinter GUI: Padding tk Label field || Python tk label customize

How to padding Python Tkinter label?
How to set Python Tkinte label padding?
how to add padding in tkinter?


Code:
import tkinter as tk
Window = tk.Tk()
Window.geometry("250x200")
Window.wm_iconbitmap('NH.ico')
Window.title("Label Tutorial")
label = tk.Label(Window, text="Insert your text: ")
label.grid(row=0, column=0, pady=5, padx=5)
entry = tk.Entry(Window)
entry.grid(row=0, column=1, pady=5, padx=5)
label1 = tk.Label(Window, text="Your text")
label1.grid(row=1, pady=5, padx=5)
Window.mainloop()

No comments:

Post a Comment