import tkinter as tk
import dui
mw = tk.Tk()
mw.title('azhu99')
mw.geometry('500x500')
def duidraw():
dui.draw()
btn1 = tk.Button(
mw,
text="对称图形",
font=(None, 20),
bg="#43CD80",
fg='black',
command=duidraw
)
btn1.place(x=10, y=10, width=200, height=50)
def duistar():
dui.star()
btn2 = tk.Button(
mw,
text='满天星',
font=(None, 20),
bg='#43CD80',
fg='black',
command=duistar
)
btn2.place(x=230, y=10, width=200, height=50)
def jie():
pass
btn3 = tk.Button(
mw,
text='接小球游戏',
font=(None, 20),
bg='#43CD80',
fg='black',
command=jie \
\
)
btn3.place(x=10, y=70, width=200, height=50)
btn4 = tk.Button(
mw,
text='小鸟管道游戏',
font=(None, 20),
bg='#43CD80',
fg='black',
command=duistar
)
btn4.place(x=230, y=70, width=200, height=50)
mw.mainloop()
``
来源:CSDN
作者:少儿编程侯老师
链接:https://blog.csdn.net/houlaos/article/details/103758347