File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments