]>
vault307.fbx.one Git - mu_code.git/blob - monthlyChecklist.py
2 from tkinter
import ttk
5 month
=(datetime
.date
.today()).strftime("%B") # get current MONTH
8 window
.title(month
) # title is current MONTH
10 reminder
=[] # button list
11 item
=[] # list of input from entry
15 style
.theme_use('default')
16 style
.configure('styled.TButton',foreground
='blue',background
='yellow')
17 style
.map('styled.TButton',
18 foreground
=[('pressed','red'),('focus','green'),('disabled','yellow')],
19 background
=[('active','yellow'),('disabled','blue')])
21 reminderEntry
=ttk
.Entry(window
, textvariable
=content
)
22 reminderEntry
.grid(row
=0,column
=0)
25 reminderEntry
.delete(0,'end')
30 reminder
.append(ttk
.Button(window
,text
=cOntent
,command
=lambda :done(),
31 style
='styled.TButton'))
34 for i
in range(len(cOntent
)):
35 reminder
[i
].configure(text
=reminder
[i
]['text']+" DONE",
37 print((reminder
[i
]).configure())
39 reminder
[-1].grid(row
=count
+2,column
=0,sticky
='nsew')
45 add
=tk
.Button(window
,text
='Add',command
=add
)
46 add
.grid(row
=1,column
=0)
47 print(window
.grid_slaves(),cOntent
)