Wednesday 13 May 2020

Python Tkinter GUI: Modify tk Label font name, color and size || Python tk label customize

Python Tkinter GUI: Modify tk Label font name, color and size ...
Python Tkinter GUI: Modify tk Label font name, color and size || Python tk label customize

How to change tkinter label font name and color?
How to set Python tkinter label font ?
How to set tkinter label background color?


Code:
import tkinter as tk
Window = tk.Tk()
label = tk.Label(Window, text="Hello ", bg="#000000", font=('Verdana', 14, 'bold'), fg="#fff")
label.pack()
label1 = tk.Label(Window, text="Hi, Web ", bg="#ccc", font=('Verdana', 14, 'bold'), fg="#fff")
label1.pack()
Window.mainloop()


#Python
#Tkinte
#Label
#font
#color
#font_size
#background

No comments:

Post a Comment