my $check = $button->cget(-state) if ($check eq 'active') { $button2->configure(-state => 'normal'); }