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

Calendar Python

Uploaded by

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

Calendar Python

Uploaded by

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

from tkinter import *

import calendar

def show():
root=Tk()
root.config(background='grey')
root.title('Calender')
root.geometry('500x660')
year=int(year_field.get())
context=calendar.calendar (year)
cal_year=Label(root, text=context, font="times 10 bold" )
cal_year.grid(row=5, column=1, padx=10)
root.mainloop

if __name__=="__main__":
new=Tk()
new.config(background='grey')
new.title('calendar')
new.geometry('150x150')

cal=Label(new, text="Calendar", bg='grey', font=("times",25,"bold"))


cal.grid(row=1, column=1)
year=Label(new, text="Enter Year: ", bg='dark grey')
year.grid(row=2, column=1)
year_field=Entry(new)
year_field.grid(row=3, column=1)
button=Button(new, text="Show Calendar", fg='black', bg='grey',command=show)
button.grid(row=4, column=2)
new.mainloop()

You might also like