set buttons "" button .enable -text Enable -command enable foreach i {error gray25 gray50 hourglass info questhead question warning} { lappend buttons [button .$i -bitmap $i -command "disableMe .$i"] } eval pack .enable $buttons -side left -expand y -fill both proc disableMe {b} { $b configure -state disabled -disabledforeground green } proc enable {} { foreach i {error gray25 gray50 hourglass info questhead question warning} { .$i configure -state normal } }