set buttons "" foreach i {a b c d e f g} { lappend buttons [button .$i -text $i -highlightcolor red \ -highlightthickness 6] bind .$i "focus .$i" } eval pack $buttons -side left -expand y -fill both