Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 examining the Monastery: (6)
As of 2024-07-16 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.