Skip to content

Commit 357308d

Browse files
author
Chloe White
committed
added placeholder functions and buttons for tasks
1 parent 4936aab commit 357308d

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

todo_list/todo.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# todo_app.py
2+
"""
3+
A simple To-Do List app skeleton using Tkinter.
4+
Google Calendar API integration will be added later.
5+
"""
6+
import tkinter as tk
7+
8+
def main():
9+
root = tk.Tk()
10+
root.title("To-Do List")
11+
root.geometry("400x400")
12+
label = tk.Label(root, text="To-Do List App Skeleton")
13+
label.pack(pady=20)
14+
root.mainloop()
15+
16+
if __name__ == "__main__":
17+
main()
18+
19+
20+
tasks = []
21+
def add_task(task):
22+
tasks.append(task)
23+
print(f"Task added: {task}")
24+
25+
def remove_task(task):
26+
if task in tasks:
27+
tasks.remove(task)
28+
print(f"Task removed: {task}")
29+
else:
30+
print(f"Task not found: {task}")
31+
32+
print("Remove task function")
33+
34+
add_button = tk.Button(root, text="Add Task", command=lambda: add_task("Sample Task"))
35+
add_button.pack(pady=10)
36+
remove_button = tk.Button(root, text="Remove Task", command=lambda: remove_task("Sample Task"))
37+
remove_button.pack(pady=10)
38+
print("Add task function")
39+
40+

0 commit comments

Comments
 (0)