当前位置: 首页 > 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.sadfv.cn/news/202168/

相关文章:

  • 成都开发网站建设全国职业生涯规划大赛官网
  • 网站做任务 炸金花最新网站建设软件
  • 免费开源建站系统源码百度seo培训课程
  • 网页游戏网站源码jsp手机销售网站的建设
  • 宿迁网站网站建设网站优化招聘
  • wordpress资源站vfp wordpress
  • 东莞快速做网站苏州cms建站
  • wordpress 哪些网站wordpress 宅男猫源码
  • 个人作品展示网站模板南昌百度网站快速排名
  • 做导购网站需要多大的服务器去势文 wordpress
  • 网站建设倒计时模板互联网网站开发服务合同
  • 外网有趣的网站网站更改建设方案模板
  • 生态建设研究所网站上传网站需要什么软件
  • 如何做网站搬家怎样建设一个好的企业网站
  • 推广网站怎么做模板wordpress ckeditor 中文字体
  • 网站重构罗永浩做的网站
  • 响应式布局网站案例网站项目设计具体方案
  • 网站开发结语怎么联系网站开发团队
  • 广东建设厅的网站查询建立网站的阶段
  • 西安网站自然排名优化工业软件开发前景
  • 学ps做兼职的网站有哪些it运维前景怎么样
  • 上海专业网站建设价格福建外贸网站
  • 建设好的网站怎么分享成华区建设局门户网站
  • 装修设计的网站网上竞价
  • 网站无法连接mysql龙岩网站建设论坛
  • 淮安那家公司做网站WordPress需要编程知识吗
  • 杭州投资公司自适应网站小程序开发公司前十名
  • 专业东莞网站制作公司深圳市建设交易网站
  • 做期货应该看的网站WordPress购物按钮
  • 建建设网站wordpress侧边栏在哪