猫史档案馆


【Python作品分享】error

用户:丁仪awa丁仪awa查看:0 回复:2 评论:0 创建时间:2021-12-07T19:09:33


【作品展示】

center_image

 

【作品介绍】

一个错误窗口的小程序

 

【作品源代码】

from tkinter import*

for i in range(10):
    the_error = Tk()
    the_error.title("ERROR")
    the_error.geometry("250x250+150+150")
    error1 = Button(
        the_error, text="OK", command=the_error.destroy, width=200)
    error2 = Button(
        the_error, text="OK", command=the_error.destroy, width=200)
    error3 = Button(
        the_error, text="OK", command=the_error.destroy, width=200)
    error4 = Button(
        the_error, text="OK", command=the_error.destroy, width=200)
    error5 = Button(
        the_error, text="OK", command=the_error.destroy, width=200)
    error6 = Button(
        the_error, text="OK", command=the_error.destroy, width=200)
    error7 = Button(
        the_error, text="OK", command=the_error.destroy, width=200)
    error8 = Button(
        the_error, text="OK", command=the_error.destroy, width=200)

    error1.pack()
    error2.pack()
    error3.pack()
    error4.pack()
    error5.pack()
    error6.pack()
    error7.pack()
    error8.pack()
    the_error.mainloop()

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
一缕余晖一缕余晖

一缕余晖来啦!!!

点赞0


评论


丁仪awa丁仪awa

我试过,tkinter模块在网页版不好使

点赞0


评论