jsteng has asked for the wisdom of the Perl Monks concerning the following question:
I am referring to TK::Listbox
http://search.cpan.org/dist/Tk/pod/Listbox.pod
I have a Listbox:
And bounded <Double-1>:$frames{"Account.List"} = $mw->Scrolled( "Listbox", -bg => $config{'background'}, -fg => '#FFFFFF', -font => [$config{'font'},$config{'fontsize'},'normal'], -relief => 'raised', -scrollbars => 'e', -cursor => 'left_ptr', );
Here is the question: How do I retrieve the foreground value #FF0000? Docs says to use itemconfigure without value: $frames{'Account.List'}->itemcget($frames{"Account.List"}->curselection(), "-foreground") but that does not work. I am stuck! My ultimate task for that is to: 1st. flip-flop the color of the text. 2nd: flip-flop the font from normal to bold. How? Thanks!$frames{"Account.List"}->bind( '<Double-1>', $frames{'Account.List'}->itemconfigure($frames{"Account.List"}->cu +rselection(), -foreground=> "#FF0000", );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to get foreground color from a TK::Listbox
by Discipulus (Canon) on Apr 14, 2018 at 12:49 UTC | |
by jsteng (Beadle) on Apr 14, 2018 at 14:12 UTC | |
by zentara (Archbishop) on Apr 15, 2018 at 11:43 UTC | |
by jsteng (Beadle) on Apr 15, 2018 at 14:39 UTC | |
by zentara (Archbishop) on Apr 17, 2018 at 11:57 UTC | |
Re: How to get foreground color from a TK::Listbox
by zentara (Archbishop) on Apr 14, 2018 at 13:02 UTC | |
Re: How to get foreground color from a ListBox
by Anonymous Monk on Apr 14, 2018 at 08:25 UTC |
Back to
Seekers of Perl Wisdom