赞
踩
- # -*-coding:utf-8 -*-
- #
- '''
- 第一个Button例子
- Button功能触发事件
- command:指定事件处理函数
- '''
- from tkinter import *
- def hellowButton():
- print('hello Button')
- root = Tk()
- Button(root, text = 'Hello Button',
- command = hellowButton).pack()
- #下面的relief = FLAT设置,不指定事件处理函数,就是一个Label了!!!
- Button(root, text = 'hello button', relief = FLAT).pack()
- root.mainloop()

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。