my ($cols, $rows) = $tl->gridSize(); for (my $i = 0; $i < $cols; $i++) { $tl->gridColumnconfigure($i, -weight => 1); } for (my $i = 0; $i < $rows; $i++) { $tl->gridRowconfigure($i, -weight => 1); }