in reply to radiobutton shapes sizes and colors Perl::Tk
#!usr/bin/perl use strict; use warnings; use Tk; my %wb; my $top = MainWindow->new(-title => 'Radiobutton'); foreach my $label (qw/Top Left Right Bottom/) { my $lower = lc $label; $wb{$lower} = $top->Radiobutton( -text => $label, -relief => 'flat', -value => $lower, -indicatoron => 0, -width => 12, -background => 'Red', -command => [\&cb_rbutton, $lower], )->pack; } Tk::MainLoop(); sub cb_rbutton { my $rb = shift; print ucfirst($rb), " is on\n"; return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: radiobutton shapes sizes and colors Perl::Tk
by pashanoid (Scribe) on Sep 15, 2011 at 09:53 UTC | |
by zentara (Cardinal) on Sep 15, 2011 at 11:59 UTC |