#!/usr/bin/python
#coding=utf-8
'''
Created on 2017年11月2日 from home

@author: James zhan
'''

from functools import partial
import Tkinter

root=Tkinter.Tk()
MyButton=partial(Tkinter.Button,root,fg='white',bg='blue')
b1=MyButton(text='Button 1')
b2=MyButton(text='Button 2')
qb=MyButton(text='quit',bg='red',command=root.quit)
b1.pack()
b2.pack()
qb.pack(fill=Tkinter.X,expand=True)
root.title('PFAs')
root.mainloop()

posted on 2017-11-22 22:04  jamezhan  阅读(149)  评论(0编辑  收藏  举报