my $push=$tab->Button(-text => "$tab ",-command=>\&run,-command =>[\&save_parms,$tab])->pack; sub run { #disable $push #do something #enable $push }