Documentation at http://www.purl.org/tcl/home/man/tcl8.4/TkCmd/button.htm . A button is a widget which is typically used by a GUI programmer to receive a simple command from the user - a "press here to submit" type idea is typically represented by a button. ---- Newcomers to Tk often experience several problems whose symptom is that "the button doesn't work right". The error usually arises from exactly when a variable like $i is evaluated. Recall that variables are substituted in strings quoted with "", but not in strings quoted with {}. So this code, which creates five buttons: for {set i 0} {$i<5} {incr i} { grid [button .b$i -text "Button $i" -command "runMyProc $i"] } has all the $i's substituted when the buttons are created. So the first button is named ".b0", has the text "Button 0", and executes the command "runMyProc 0". But if you put the command script in braces, like this: for {set i 0} {$i<5} {incr i} { grid [button .b$i -text "Button $i" -command {runMyProc $i}] } then all five buttons get the identical command script, "runMyProc $i". This time, the $i gets evaluated much later when the user clicks the button. The command script runs in the global scope, and there may or may not even be a variable named "i". For more details, see the [FMM] or specifically [http://www.phaseit.net/claird/comp.lang.tcl/fmm.html#button]. See also: [Variable substitution in -command scripts] ---- '''Pop-up buttons:''' I'm not sure whether that's the right term, but I mean buttons that normally have a flat relief, and only pop up lightly when the mouse is over them. I like this recent MS fancy, and it's easy to have in Tk, if you just globally declare option add *Button.borderWidth 1 option add *Button.relief flat bind Button {+ %W config -relief raised} bind Button {+ %W config -relief flat} Then all buttons of your app (even the Tk error dialog ;-) will have pop-up behavior. ([RS]) ---- [Category Widget] - [Category Command] - [Tk syntax help] - [Arts and Crafts of Tcl-Tk Programming]