When I first started building desktop applications with Python, I often struggled with the small details of the user interface.
One common requirement I ran into was having a checkbox already ticked when the application window opens.
Whether you are building a settings panel or a shipping form, setting a default state saves your users a click.
In this tutorial, I will show you exactly how to make a Tkinter checkbox checked by default using my favorite methods.
The Importance of Default States in UI Design
In my years of developing tools for logistics companies in the US, I’ve learned that user experience is everything.
Imagine a user in Chicago filling out a shipping form where “Standard Ground Shipping” is the most common choice.
By having that option pre-selected, you make the workflow faster and reduce the chance of errors.
Tkinter makes this relatively simple, but you have to understand how variables “bind” to the widgets.
Method 1: Use the set() Function with IntVar
This is my go-to method because it is incredibly reliable and easy to read. In Tkinter, a Checkbutton usually needs a variable to track whether it is on or off.
I prefer using IntVar() because it maps perfectly to 1 (checked) and 0 (unchecked).
Let’s look at a practical example involving a US Tax Filing preference.
import tkinter as tk
def show_state():
print(f"Option selected: {tax_var.get()}")
# Initialize the main window
root = tk.Tk()
root.title("US Tax Preference Form")
root.geometry("400x250")
# 1. Create the variable
# This variable will hold the state of our checkbox
tax_var = tk.IntVar()
# 2. Set the default value to 1 (Checked)
# This is the "magic" line that checks the box by default
tax_var.set(1)
# 3. Create the Checkbutton and link it to the variable
check = tk.Checkbutton(
root,
text="Include Federal Tax Calculation",
variable=tax_var,
command=show_state,
font=("Arial", 12)
)
check.pack(pady=20)
# Add a simple exit button
exit_btn = tk.Button(root, text="Submit", command=root.destroy)
exit_btn.pack(pady=10)
root.mainloop()You can refer to the screenshot below to see the output.

When you run this code, you will notice the “Include Federal Tax Calculation” box is already filled.
I’ve found that setting the variable before creating the widget ensures the UI renders correctly the first time.
Method 2: Use BooleanVar for True/False States
If you prefer working with Boolean values rather than integers, BooleanVar() is a great alternative.
I often use this when I am passing the data directly into a database or a logic function that expects True or False.
Let’s use an example of a “Save Password” feature for a secure portal.
import tkinter as tk
root = tk.Tk()
root.title("Secure Login Portal")
root.geometry("400x200")
# Initialize BooleanVar
save_login_var = tk.BooleanVar()
# Set it to True to check it by default
save_login_var.set(True)
# Create the checkbox
save_check = tk.Checkbutton(
root,
text="Remember my credentials for 30 days",
variable=save_login_var
)
save_check.pack(pady=30)
root.mainloop()You can refer to the screenshot below to see the output.

In this case, save_login_var.get() will return True by default. It’s a cleaner way to handle logic if you don’t need the 0/1 integer distinction.
Method 3: Use the toggle() Method
Sometimes, you might want to check a box without explicitly using a Tkinter variable. While I don’t recommend this for complex apps, it works well for quick scripts.
The toggle() method simply flips the current state of the checkbox.
If a checkbox starts as unchecked (the default), calling toggle() will check it.
import tkinter as tk
root = tk.Tk()
root.title("Quick Preferences")
root.geometry("300x150")
# Create the checkbutton without an explicit variable
fast_ship_check = tk.Checkbutton(root, text="Enable Overnight Shipping (USA Only)")
fast_ship_check.pack(pady=20)
# Programmatically toggle it to 'on'
fast_ship_check.toggle()
root.mainloop()You can refer to the screenshot below to see the output.

I usually avoid this in large projects because it’s harder to track the state of the checkbox later.
However, for a simple “one-off” UI, it gets the job done quickly.
Method 4: Select via the select() Method
Similar to toggle(), the select() method is built into the Checkbutton widget itself. I find this method very useful when I want to reset a form back to its default “checked” state.
Instead of hunting down the variable, you can call the method directly on the widget object.
import tkinter as tk
def reset_form():
# This forces the checkbox to be selected
marketing_check.select()
root = tk.Tk()
root.title("Subscription Settings")
root.geometry("400x300")
marketing_check = tk.Checkbutton(root, text="Receive Weekly Newsletter")
marketing_check.pack(pady=10)
# Check it by default when the app starts
marketing_check.select()
reset_btn = tk.Button(root, text="Reset to Default", command=reset_form)
reset_btn.pack(pady=20)
root.mainloop()This is a very explicit way to handle the UI state.
Why Use Variables Over Widget Methods?
In my experience, using IntVar or BooleanVar (Method 1 and 2) is the “Professional Way.”
The reason is that these variables act as a “Single Source of Truth.”
If you have multiple parts of your program that need to know if that box is checked, they just look at the variable.
If you use select() or toggle(), you often have to query the widget itself, which can lead to messy code.
Practical Use Case: A Delivery App Interface
Let’s put everything together into a more realistic scenario. Imagine we are building a delivery interface for a restaurant chain in New York.
We want “Leave at door” to be the default delivery instruction.
import tkinter as tk
from tkinter import messagebox
class DeliveryApp:
def __init__(self, master):
self.master = master
master.title("Big Apple Delivery Service")
master.geometry("450x350")
self.label = tk.Label(master, text="Delivery Options", font=("Helvetica", 16, "bold"))
self.label.pack(pady=15)
# Setup our variable
self.leave_at_door_var = tk.IntVar()
# Set default to Checked
self.leave_at_door_var.set(1)
# Create Checkbutton
self.check = tk.Checkbutton(
master,
text="Contactless Delivery: Leave at my door",
variable=self.leave_at_door_var,
font=("Helvetica", 11)
)
self.check.pack(pady=10)
# Submit button
self.submit = tk.Button(master, text="Place Order", command=self.process_order, bg="green", fg="white")
self.submit.pack(pady=20)
def process_order(self):
status = "Enabled" if self.leave_at_door_var.get() == 1 else "Disabled"
messagebox.showinfo("Order Placed", f"Contactless delivery is {status}.")
if __name__ == "__main__":
root = tk.Tk()
app = DeliveryApp(root)
root.mainloop()This structure is how I build most of my production Python apps. It keeps the logic (the variable) separate from the display (the widget).
Handle Multiple Default Checked Boxes
What if you have a list of options, like selecting interests for a US-based travel app? You can use a loop to create multiple variables and set them all to a default state.
import tkinter as tk
root = tk.Tk()
root.title("Travel Interests")
root.geometry("400x400")
interests = ["National Parks", "Broadway Shows", "Grand Canyon Tours", "Beach Resorts"]
variables = []
tk.Label(root, text="Select your interests:", font=("Arial", 12, "underline")).pack(pady=10)
for item in interests:
var = tk.IntVar(value=1) # You can set value right in the constructor!
variables.append(var)
cb = tk.Checkbutton(root, text=item, variable=var)
cb.pack(anchor="w", padx=50)
root.mainloop()Using value=1 inside the IntVar() constructor is a neat shortcut I use to save a line of code.
Troubleshoot Common Issues
Sometimes, you might set the variable, but the checkbox still appears empty.
This usually happens because of “Variable Garbage Collection.”
If you create your IntVar inside a function and don’t attach it to self or a global object, Python might delete it.
Always make sure your variable persists as long as your window is open.
Another tip: make sure you aren’t calling deselect() somewhere else in your code by accident.
I have spent hours debugging UI issues only to find a stray deselect() call in a reset function!
Customize the Look of the Checked State
In the US, we often want our apps to have a specific “branding.”
While the default checkmark is standard, you can change colors to make the checked state stand out.
# Change the color of the checkmark area
check = tk.Checkbutton(
root,
text="Premium Member",
variable=var,
selectcolor="lightyellow", # Background of the box when checked
activebackground="blue"
)This doesn’t change the “checked” logic, but it helps the user see that the default option is active.
Setting a default state for your checkboxes is a small step that makes a huge difference.
It shows that you have thought about the user’s journey and want to make their experience as smooth as possible.
I hope this guide helps you build better, more intuitive Python applications.
In this tutorial, I showed you how to use IntVar, BooleanVar, and direct widget methods to check a Tkinter checkbox by default.
The most robust way is using IntVar with the set(1) method, as it provides the most control over your application’s data.
Try implementing this in your next project, perhaps for a default “Terms and Conditions” agreement or a preferred shipping method.
You may also like to read:
- How to Wrap Text in Tkinter Label
- Python Tkinter Frame Grid
- Python Tkinter Button Click
- How to Restrict Tkinter Entry to Numbers Only

I am Bijay Kumar, a Microsoft MVP in SharePoint. Apart from SharePoint, I started working on Python, Machine learning, and artificial intelligence for the last 5 years. During this time I got expertise in various Python libraries also like Tkinter, Pandas, NumPy, Turtle, Django, Matplotlib, Tensorflow, Scipy, Scikit-Learn, etc… for various clients in the United States, Canada, the United Kingdom, Australia, New Zealand, etc. Check out my profile.