#!/usr/bin/perl use strict; use warnings; use Tk; my $mw = tkinit(); my $parent_frame = $mw->Frame()->pack(-fill => 'both', -expand => 1,); my $left = $parent_frame->Frame(-bg => 'red')->pack(-side => 'left', -fill => 'x', -expand => 1,); $left->Button(-text => 'test',)->pack(); my $right = $parent_frame->Frame(-bg => 'blue')->pack(-side => 'left', -fill => 'x', -expand => 1,); $right->Button(-text => 'test',)->pack(); $mw->MainLoop();