from tkinter import *
import tkinter as tk
from PIL import ImageTk, Image
import calendar
root = tk.Tk()
root.geometry('400x300')
root.title('Simple Calendar')
def show():
m = int(month.get())
y = int(year.get())
output = calendar.month(y,m)
cal.insert('end',output)
def clear():
cal.delete(1.0,'end')
def exit():
root.destroy()
title = Label(root,text="SIMPLE CALENDAR APP",font=('verdana','18','bold'))
title.place(x=40,y=10)
m_label = Label(root,text="Month",font=('verdana','10','bold'))
m_label.place(x=70,y=80)
month = Spinbox(root, from_= 1, to = 12,width="5")
month.place(x=140,y=80)
y_label = Label(root,text="Year",font=('verdana','10','bold'))
y_label.place(x=210,y=80)
year = Spinbox(root, from_= 2020, to = 3000,width="8")
year.place(x=260,y=80)
cal = Text(root,width=33,height=8,relief=RIDGE,borderwidth=2)
cal.place(x=70,y=110)
show = Button(root,text="Show",font=('verdana',10,'bold'),relief=RIDGE,borderwidth=2,command=show)
show.place(x=140,y=250)
clear = Button(root,text="Clear",font=('verdana',10,'bold'),relief=RIDGE,borderwidth=2,command=clear)
clear.place(x=200,y=250)
exit = Button(root,text="Exit",font=('verdana',10,'bold'),relief=RIDGE,borderwidth=2,command=exit)
exit.place(x=260,y=250)
root.mainloop()
Simple Calendar App using Python with Free Source Code.zip
161 浏览量
2023-11-03
16:44:44
上传
评论
收藏 935B ZIP 举报
xiaoshun007~
- 粉丝: 3853
- 资源: 3129
最新资源
- 基于Java的mortnon高质量快速开发框架设计源码
- 基于Typescript的react-native-iconfont-cli图标转换工具设计源码
- 基于Android的日记本设计源码
- 基于Python的金融资讯数据展示Web项目设计源码
- 基于Vue的太一·学术前端设计源码
- 基于Vue的湘南科创产业园大屏遥控端设计源码
- 基于Javascript的P03150114 BisLstm_water水产量预测设计源码
- Ai变声工具:实时语音变换器Supertone Shift 可将实时变化直播说话声音
- 基于Python的Struts2全漏洞扫描利用工具设计源码
- 基于Javascript的React Native Helloword设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈