in reply to Perl Tk Button Disabled
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Tk Button Disabled
by PilotinControl (Pilgrim) on Oct 25, 2022 at 00:14 UTC | |
by GrandFather (Saint) on Oct 25, 2022 at 00:36 UTC |