ZJ.Mike.2009 has asked for the wisdom of the Perl Monks concerning the following question:
A radiobutton is a widget that has a textual string and a circle. In the following code, without the mouse hovering on the radiobutton, the background colors of the circle and the text are white and khaki separately. With the mouse hovering, the background colors of the circle and the text are both khaki. Is there a way to make the background color of the circle stay white? Or is this some kind of compatibility issue with Tk running on Windows (I'm running Tk 804.29 with ActivePerl 5.12.1 on Win XP)? A WxPerl radiobutton does not seem to give me this problem.
use strict; use warnings; use Tk; my $mw = MainWindow -> new(); my $frame = $mw -> Frame()-> pack( ); my $id = 0; my $bg_color = 'khaki'; my $radio_button1 = $frame -> Radiobutton ( -text => 'RadioButton1', -value =>0, -variable => \$id, -bg => $bg_color, -activebackground => $bg_color, -activeforeground => 'red', ) -> pack (); my $radio_button2 = $frame -> Radiobutton ( -text => 'RadioButton1', -value =>1, -variable => \$id, -bg => $bg_color, -activebackground => $bg_color, -activeforeground => 'red', ) -> pack (); MainLoop;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Does the active background color of the circle of a Tk radio button have to be the same as that of the textual string?
by zentara (Archbishop) on Jul 09, 2011 at 14:52 UTC | |
Re: Does the active background color of the circle of a Tk radio button have to be the same as that of the textual string?
by Anonymous Monk on Jul 09, 2011 at 14:39 UTC |
Back to
Seekers of Perl Wisdom