Mit -columnspan und -rowspan
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl -w
use strict;
use warnings;
use Tk;
my $mw = MainWindow->new;
my @frames;
$frames[$_] = $mw->Frame( -borderwidth => 2, -relief => 'groove' ) for (0..4);
$frames[0]->grid( -column => 0, -row => 0, -columnspan => 2, -sticky => 'nsew' );
$frames[1]->grid( -column => 0, -row => 1, -rowspan => 2, -sticky => 'ns' );
$frames[2]->grid( -column => 1, -row => 1 );
$frames[3]->grid( -column => 1, -row => 2 );
$_->Label( -text => 'Frame' )->pack() for( @frames );
MainLoop();