http://qs321.pair.com?node_id=1093178


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

The text is way too close to the radio button

Maybe not the most elegant solution, but wouldn't it be easiest to simply pad the text with a couple of spaces?

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^2: How do I space out each radio button horizontally in Perl/Tk
by Janish (Sexton) on Jul 11, 2014 at 05:52 UTC

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

      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.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^2: How do I space out each radio button horizontally in Perl/Tk
by ww (Archbishop) on Jul 12, 2014 at 00:13 UTC
    Not really, because when the padding-with-spaces hits the browser, the browser will ignore multiple white-space characters after the first (or is it the last?) In any case, to pad with spaces anything that's going to a browser, you'll have to use &nbsp;, or CSS styling.

    check Ln42!

      you'll have to use  , or CSS styling
      But we are not talking HTML here. It's Tk!

      -- 
      Ronald Fischer <ynnor@mm.st>