本文共 607 字,大约阅读时间需要 2 分钟。
最近要弄弄以前想弄的东东了,
所以图形界面不可少,,TKinter, 就用它了,
简单,满足要求。
#coding: utf8from Tkinter import *def tklabel(event): s = Label(root, text="IloveXin") s.pack()root = Tk()root.wm_title("hello")labelA = Label(root, text="learn tkinter", background="green")labelB = Label(root, text="learn tkinter", background="red")labelC = Label(root, text="learn tkinter", background="blue")b1 = Button(root, text="click", command=tklabel)b2 = Button(root, text="click")b2['width'] = 30b2['height'] = 6b2['background'] = 'pink'b2.bind("", tklabel)b1.pack()b2.pack()labelA.pack()labelB.pack()labelC.pack()root.mainloop()
转载地址:http://bjjjo.baihongyu.com/