my $check = $button->cget(-Value) if ($check == 1) { $button2->configure(-state => 'enable'); }