in reply to Beginner TK frame question: left aligning buttons

This is left justified, vertically aligned ie the usual. You need the west anchor and a width to make it take. pack( side => 'top' ) is the default so just ->pack() will do, or even just ->pack

$left_frame->Radiobutton( -text => $r, -variable => \$radio_state, -value => $r, -command => [ sub { 'foo' } ], -anchor => 'w', -width => 10, )->pack( side => 'top', );

cheers

tachyon

Replies are listed 'Best First'.
Re^2: Beginner TK frame question: left aligning buttons
by qumsieh (Scribe) on Sep 12, 2004 at 15:23 UTC
    Instead of hard-coding a width, you can also use the
    -fill => 'x'
    option of pack() to make the widget take any extra horizontal space in its parent. You still need the
    -anchor => 'w'
    bit of course.

      That is much more elegant.

      cheers

      tachyon