Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Perl Tk Button Disabled

by GrandFather (Saint)
on Oct 25, 2022 at 00:36 UTC ( [id://11147662]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %context;
    
    ...
    $button->bind('<ButtonRelease-1>' => sub{chg_btn(\%context, @_});
    
  2. or download this
    sub sensorHandler {
       my ($context, ...) @_;
    ...
       $context->{sensorOn} = $data !~ /(?<![\w-])OFF(?![\w-])/i;
       ...
    }
    
  3. or download this
    sub chg_btn { 
       my ($context, ...) = @_;
    ...
       $btn1->configure(-background => "green", -foreground => "black") 
          if !$context->{sensorOn};
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11147662]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found