Displaying 1 result from an estimated 1 matches for "set_bg".
Did you mean:
set_bit
2001 Sep 19
2
tcltk: Difficulties creating menus
...owing
example (from the O'Reilly book on Perl/Tk) works fine:
#!/usr/bin/perl -w
use Tk;
my $mw = MainWindow->new;
$menub = $mw->Menubutton(-text => "Color")->pack();
foreach (qw/red yellow green blue grey/) {
$menub->radiobutton(-label => $_, -command => \&set_bg,
-variable => \$background_color, -value => $_);
}
MainLoop;
sub set_bg {
print "Background value is now: $background_color\n";
$mw->configure(-background => $background_color);
}
I cannot get anything similar to work under R. Adding a tkmenubutton i...