Slip 23 - A) Write a Python GUI program to create a label and change the label font style (font name, bold, size) using tkinter module.

Solution :

Post a Comment

1 Comments

  1. import tkinter as tk

    root = tk.Tk()
    root.title("Label Font Style Example")
    root.geometry("300x100")

    # Create a label with font set to Arial, size 16, bold
    label = tk.Label(root, text="Hello Tkinter!", font=("Arial", 16, "bold"))
    label.pack(pady=20)

    root.mainloop()

    ReplyDelete