Perhaps you want to condition setting the state of the button depending on sensor state?
sub four() { my $buttonState = sensorIsOn() ? "disabled" : "normal"; $Button1->configure(-state => $buttonState); $buttonState = ucfirst $buttonState; print "State $buttonState\n"; }
Update: Fixed typo (thanks AnomalousMonk)
In reply to Re: Perl Tk Button Disabled
by GrandFather
in thread Perl Tk Button Disabled
by PilotinControl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |