-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalender.py
More file actions
33 lines (29 loc) · 1.04 KB
/
calender.py
File metadata and controls
33 lines (29 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from tkinter import *
import calendar
def showCal() :
new_gui = Tk()
new_gui.config(background = "white")
new_gui.title("CALENDER")
new_gui.geometry("550x600")
fetch_year = int(year_field.get())
cal_content = calendar.calendar(fetch_year)
cal_year = Label(new_gui, text = cal_content, font = "Consolas 10 bold")
cal_year.grid(row = 5, column = 1, padx = 20)
new_gui.mainloop()
if __name__ == "__main__" :
gui = Tk()
#gui.config(background = "yellow")
gui.title("CALENDER")
gui.geometry("280x160")
cal = Label(gui, text = "SEARCH YEAR",font = ("times", 28, 'bold'))
year = Label(gui, text = "Enter Year")
year_field = Entry(gui)
Show = Button(gui, text = "Show Calendar", fg = "Black",
command = showCal)
Exit = Button(gui, text = "Exit", fg = "Black",command = exit)
cal.grid(row = 1, column = 1)
year.grid(row = 2, column = 1)
year_field.grid(row = 3, column = 1)
Show.grid(row = 4, column = 1)
Exit.grid(row = 6, column = 1)
gui.mainloop()