Re: left justifying radiobuttons
Marc Dashevsky <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
At 12:15 PM 12/30/2005, listmail wrote:
># 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) {
(($x < 6) ? $sframe1 : $sframe2)->Radiobutton(
-text => $selection,
-variable => \$selected,
-value => $selection,
-justify => 'left',
)->pack(-side => 'top', -anchor => 'w');
$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]
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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]