Coding Tutorials Hub

Learn coding with simple code, clear explanations, and examples

Python TKinter GUI - Checkbutton Widget

📄 Code


import tkinter as tk

# Create the main window
root = tk.Tk()
root.title("Tkinter-GUI checkbutton Tutorial")
root.geometry("300x50")

# Create a check button
checkbutton = tk.Checkbutton(root, text="Accept terms")
checkbutton.pack(pady=10)

# Run the application
root.mainloop()
        
💡 Output