http://www.perlmonks.org?node_id=1093179


in reply to Re: How do I space out each radio button horizontally in Perl/Tk
in thread How do I space out each radio button horizontally in Perl/Tk

Thanks for your reply. What do you means by pad the test with spaces? Sample code would be very much helpful to me

  • Comment on Re^2: How do I space out each radio button horizontally in Perl/Tk

Replies are listed 'Best First'.
Re^3: How do I space out each radio button horizontally in Perl/Tk
by stefbv (Curate) on Jul 11, 2014 at 06:29 UTC

    Probably this is what rovf sugested, also note that I use Tk::RadiobuttonGroup.

    use strict; use warnings; use Tk; use Tk::widgets qw(RadiobuttonGroup); my $mw = MainWindow->new; $mw->Label( -text => 'Package Selection', -justify => 'left' )->pack; my $package = 'normal'; my $radiobuttongroup = $mw->RadiobuttonGroup ( -list => [' normal', ' pckg_A', ' pckg_B'], -orientation => 'vertical', -variable => \$package, -command => sub { print $package, "\n"; } )->pack; MainLoop;
      Thank you but my system restrict me to use radiobuttongroup.

        That's not a problem:

        use strict; use warnings; use Tk; my $mw = MainWindow->new; my $package = 'normal'; foreach my $type (qw(normal pckg_A pckg_B)) { $mw->Radiobutton( -text => " $type", -value => $type, -variable => \$package, )->pack; } MainLoop;
A reply falls below the community's threshold of quality. You may see it by logging in.