组件,在Tk中英文叫做 Widget。
http://www.tcl.tk/man/tcl8.4/TkCmd/button.htm
Button(按钮)是常用的用来触发事件的控件。
对于Button来说,关键属性包括
其基本的使用相对比较简单,看起来像下面这个样子:
#!/bin/wish proc cmd_btn_pushed {} { puts "The button is pushed" } button .btn -text "Push Me" -command {cmd_btn_pushed} button .btn_yellow -text "Yellow Button" -bg yellow pack .btn pack .btn_yellow