0% found this document useful (0 votes)
74 views1 page

To-Do List App Using Tkinter in Python

This document outlines the creation of a To-Do List application using Python's Tkinter library. It includes the source code for adding and deleting tasks within the app. The application features a simple GUI with an entry field and buttons for user interaction.

Uploaded by

zacklygammer567
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views1 page

To-Do List App Using Tkinter in Python

This document outlines the creation of a To-Do List application using Python's Tkinter library. It includes the source code for adding and deleting tasks within the app. The application features a simple GUI with an entry field and buttons for user interaction.

Uploaded by

zacklygammer567
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

To-Do List App using Tkinter in Python

Abstract

This document details the design and implementation of a To-Do List desktop app using
Python's Tkinter GUI library.

Source Code

import tkinter as tk
from tkinter import messagebox

def add_task():
task = entry.get()
if task:
listbox.insert(tk.END, task)
entry.delete(0, tk.END)
else:
messagebox.showwarning("Warning", "Please enter a task.")

def delete_task():
try:
selected = listbox.curselection()[0]
listbox.delete(selected)
except:
messagebox.showwarning("Warning", "Select a task to delete.")

root = tk.Tk()
root.title("To-Do List")

entry = tk.Entry(root, width=40)


entry.pack(pady=10)

listbox = tk.Listbox(root, width=40)


listbox.pack(pady=10)

add_button = tk.Button(root, text="Add Task", command=add_task)


add_button.pack(pady=5)

delete_button = tk.Button(root, text="Delete Task", command=delete_task)


delete_button.pack(pady=5)

root.mainloop()

You might also like