import tkinter

def func():
print("sunck is a good man")

win = tkinter.Tk()
win.title("sunck")
win.geometry("400x400+200+20")

#创建按钮
button1 = tkinter.Button(win, text="按钮", command=func, width=10, height=10)
button1.pack()

button2 = tkinter.Button(win, text="按钮", command=win.quit)
button2.pack()

win.mainloop()

相关文章:

  • 2021-08-05
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2021-12-21
  • 2021-06-04
相关资源
相似解决方案