I posted #4 and after some more experimenting got things to work. Just needed to c/p cowboy's code literally.
In my defense, his comment
"You just have to change the letter to match the button."
mislead me... who would have thought there was a Tkx::i::... method (the "letter i") and most real code wouldn't have used ".b" as the widget id. What a waste of time. FTR, the following snipped works as reported.
...snip... my $mw = Tkx::widget->new("."); $mw->g_wm_title("Jobs Not Forecasted"); Tkx::button(".b", -text => "18-Letters", -background => "red", -width => 11, -command => sub { print "18L\n"; Tkx::i::call( ".b", "configure", +"-background", "blue" ); } }, ); Tkx::pack(".b"); ...snip...
In reply to Re^5: How to change colour of a Tkx button when pressed
by Anonymous Monk
in thread How to change colour of a Tkx button when pressed
by PerlCowboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |