left justifying radiobuttons

listmail <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
# Need help left justifying both the radiobuttons and the text for each 
column (frame) inside the Dialog.
# Is it possible?  Right now it appears to be centering the radiobuttons 
and text within each column.

use strict;
use warnings;
use Tk;
use Tk::Dialog;

my 
@selections=('one','two','three','four','five','six','seven','eight','nine','ten');
my $selected;

my $selector = MainWindow->new(-title=> "Select Test");

$selector->Dialog(-title => "Select",
                  -buttons => ['Ok','Cancel'],
                  -default_button => 'Ok');

my $sframe1=$selector->Frame()->pack(-side=>'left');
my $sframe2=$selector->Frame()->pack(-side=>'right');

my $x=1;

foreach my $selection (@selections) {
                        if ($x < 6) {
                                    $sframe1->Radiobutton(-text => 
"$selection"
                                                          ,-variable => 
\$selected
                                                          ,-value => 
"$selection"
                                                          , -justify=>'left'
                                                         )->pack(-side 
=> 'top');
                        } else {
                                    $sframe2->Radiobutton(-text => 
"$selection"
                                                          ,-variable => 
\$selected
                                                          ,-value => 
"$selection"
                                                          ,-justify => 
'left'
                                                         )->pack(-side 
=> 'top');
                        }
                        $x++
}

MainLoop();
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.