my $frame = $parent->Frame(-width => 300)->pack(-fill => 'x', -expand => 1); $frame->Button(-text => 'ok', -command => sub{...})->pack();