in reply to Re: Change button color with Tk
in thread Change button color with Tk
Aside from coding a sub for each button, could I use a if then to configure for an array? The goal is to change the color of the button once it is pressed.my $button1 = $mw->Button(-text => "18-Letters", -command => sub {print OUTFILE "18L\n"}, -command => \&change)->pack(-side => "top"); sub change { $button1->configure(-background=>"yellow") }
my @btn = $button1-$button28;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Change button color with Tk
by Discipulus (Canon) on Nov 02, 2017 at 20:14 UTC |