import tkinter as tk
from tkinter.constants import CENTER
def plus():
print("你點擊了按鈕")
window = tk.Tk()
window.title('GUI')
window.config(bg="lightyellow")
window.geometry('380x400')
window.resizable(False, False)
test = tk.Button(text="結帳",command=plus,bg="blue",fg="white",font=('標楷體', 16, "bold"))
# test.pack(side="bottom")
test.place(x=330,y=360,anchor=CENTER)
window.mainloop()
沒有留言:
張貼留言