from tkinter import *
#主窗口
win = Tk()
win.config(bg='#87CEEB')
win.title("alex9ufoexploer")
win.geometry('500x350+300+300')
win.iconbitmap('tsmc.ico')
#在窗口内创建按钮,以表格的形式依次排列
for i in range (10):
for j in range (10):
Button (win, text=" (" + str(i) + ","+ str(j)+ ")",bg='#D1EEEE') .grid(row=i,column=j)
# 在第5行第11列添加一个Label标签
Label(win,text="alex9ufo",fg='blue',font=('楷体',12,'bold')).grid(row =4,column=11)
#开始窗口的事件循环
win. mainloop()
沒有留言:
張貼留言