Keep It Simple, Stupid | |
PerlMonks |
Re: How to get foreground color from a TK::Listboxby Discipulus (Canon) |
on Apr 14, 2018 at 12:49 UTC ( [id://1212869]=note: print w/replies, xml ) | Need Help?? |
Hello jsteng and welcome to the monastery and to the wonderful world of perl! I tried a bit and it seems i get trouble first time I query one property: $lb->itemcget($sel, '-background') so I provide the initial value manually: my $current_color_bg = $lb->itemcget($sel, '-background') || 'yellow'; Here a working example flipping the colors:
Double clicking the first entry 3 time and one time the second:
L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|