当前位置: 首页 > news >正文

保定医疗网站建设公司民宿行业网站建设方案

保定医疗网站建设公司,民宿行业网站建设方案,免费做试卷的网站,去大连需要下载哪些软件本章内容主要是利用python制作一个简单的桌面倒计时程序#xff0c;包含开始、重置 、设置功能。 目录 一、效果演示 二、程序代码 一、效果演示 二、程序代码 #!/usr/bin/python # -*- coding: UTF-8 -*-author: Roc-xb import tkin… 本章内容主要是利用python制作一个简单的桌面倒计时程序包含开始、重置 、设置功能。 目录 一、效果演示 二、程序代码 一、效果演示 二、程序代码 #!/usr/bin/python # -*- coding: UTF-8 -*-author: Roc-xb import tkinter as tk from tkinter import simpledialog from tkinter import messageboxclass CountdownTimer:def __init__(self, root):self.root rootself.root.title(倒计时程序)self.root.geometry(450x300)self.countdown_value 60self.is_counting Falseself.canvas tk.Canvas(self.root, width200, height200, bgwhite)self.canvas.place(x20, y20)self.countdown_label tk.Label(self.root, text倒计时: 60s, font(Arial, 20))self.countdown_label.place(x250, y20)self.start_button tk.Button(self.root, text开始, commandself.start_countdown)self.start_button.place(x250, y70)self.reset_button tk.Button(self.root, text重置, commandself.reset_countdown)self.reset_button.place(x250, y120)self.set_button tk.Button(self.root, text设置, commandself.set_countdown)self.set_button.place(x250, y170)def start_countdown(self):if self.is_counting:returnself.is_counting Trueself.countdown()def countdown(self):if self.countdown_value 0 and self.is_counting is True:self.countdown_value - 1self.countdown_label.config(text倒计时: str(self.countdown_value) s)self.canvas.delete(all)self.canvas.create_rectangle(0, 200 - self.countdown_value * 2, 200, 300, fillgreen)self.root.after(1000, self.countdown)elif self.countdown_value 0 and self.is_counting is False:self.canvas.delete(all)self.is_counting Falsereturnelse:self.is_counting Falsemessagebox.showinfo(提示, 倒计时结束)def reset_countdown(self):self.is_counting Falseself.countdown_value 60self.countdown_label.config(text倒计时: str(self.countdown_value) s)self.canvas.delete(all)def set_countdown(self):if self.is_counting:returnvalue tk.simpledialog.askinteger(设置倒计时, 请输入倒计时时间秒, parentself.root)if value is not None:self.countdown_value valueself.countdown_label.config(text倒计时: str(self.countdown_value) s)self.canvas.delete(all)if __name__ __main__:root tk.Tk()app CountdownTimer(root)root.mainloop()
http://www.hkea.cn/news/14411071/

相关文章:

  • 河南企起网站建设深圳建站工作室
  • 购物网站设计泉州公司建设网站
  • 杭州网站建设哪家比较好上海到北京的火车
  • 招商网站的建设意义网站建设的书
  • 模具加工东莞网站建设技术支持绵阳欣诚建设
  • 开发一个商城网站多少钱推广方案设计
  • 尼乐清网站建设江门模板建站定制
  • 创业做网站失败百度搜索排行榜风云榜
  • 二级域名做很多网站网络营销策略分析案例
  • 新建的网站怎么登录做网页的软件有什么
  • 临海门户网站住房和城乡建设规划局做视频的素材什么网站好
  • 网络用户提要求找人帮忙做的网站做门户网站用什么模板
  • 中山本地网站建设哪个网站做摄影师好
  • 晋中推广型网站开发网站黑链代码
  • 扬州建设会计学会网站苏格网站建设
  • 建立网站 营业执照广州安全教育平台登录账号
  • 湖南网站设计亮点wordpress 后台管理界面插件
  • 企业网站定制公司汕头网站推广优化
  • 目前比较流行的公司网站建站技术无广告免费追剧软件
  • 专门做二手手机的网站吗制作简历哪个网站好
  • 如何做网站跳转登入个人参与防疫工作总结
  • 建设网站昌都地区wordpress给分类页加关键词
  • 网站建设过程中的网站设计怎么做响应式网站图解
  • 网站开发课程设计大学生创新产品设计作品
  • 景观设计网站推荐seo推广软件哪个好
  • 幽灵按钮网站网站建设技能培训
  • 中山祥云做的网站小制作简单又漂亮
  • 男女做爰网站龙岩在线网
  • 泰安营销型网站建设辽宁省城乡和住房建设厅老网站
  • 学校介绍网站模板网站建设学的是什么知识