import tkinter
import draw1, draw2, draw3, draw4
import game
def draw():
draw1.picture()
def drawStar():
draw2.picture2()
def drawTai():
draw3.main()
def drawDuo():
draw4.main()
def pickBall():
game.main()
mywindow = tkinter.Tk()
mywindow.geometry("300x500")
mywindow.title("nancy牌4399")
# 按钮
btnU = tkinter.Button(
mywindow,
text="画图",
font=("Airal", 20),
fg="black",
bg="#DCDCDC",
bd=0.5,
command=draw
)
btnU.place(x=20, y=20, width=100, height=60)
# 按钮
btnA = tkinter.Button(
mywindow,
text="满天星",
font=("Airal", 20),
fg="black",
bg="#DCDCDC",
bd=0.5,
command=drawStar
)
btnA.place(x=140, y=20, width=100, height=60)
# 按钮
btnB = tkinter.Button(
mywindow,
text="太极",
font=("Airal", 20),
fg="black",
bg="#DCDCDC",
bd=0.5,
command=drawTai
)
btnB.place(x=20, y=100, width=100, height=60)
btnC = tkinter.Button(
mywindow,
text="哆啦A梦",
font=("Airal", 20),
fg="black",
bg="#DCDCDC",
bd=0.5,
command=drawDuo
)
btnC.place(x=140, y=100, width=100, height=60)
btnR = tkinter.Button(
mywindow,
text="接小球",
font=("Airal", 20),
fg="black",
bg="#DCDCDC",
bd=0.5,
command=pickBall
)
btnR.place(x=20, y=180, width=100, height=60)
mywindow.mainloop()
来源:CSDN
作者:少儿编程侯老师
链接:https://blog.csdn.net/houlaos/article/details/103831541