left justifying radiobuttons
by Listmail other posts by this author
Dec 30 2005 9:28AM messages near this date
Re: Change scrollbar/scale slider image ?
|
Re: left justifying radiobuttons
SOURCE # 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 majordomo@lists.stanford.edu
Thread:
Listmail
Marc Dashevsky
IvorW
|