in reply to Controlling resize of Tk::Panedwindow

G'day Hugo,

I would've implemented the layout you describe as follows.

#!/usr/bin/env perl use strict; use warnings; use Tk; my $mw = MainWindow::->new(); my $fAB = $mw->Frame()->pack(-fill => 'both', -expand => 1); my $fA = $fAB->Frame(-bg => '#ff0000' )->pack(-side => 'left', -fill => 'both', -expand => 1); my $fB = $fAB->Frame(-bg => '#ffff00' )->pack(-side => 'left', -fill => 'y'); my $fC = $mw->Frame(-bg => '#0000ff' )->pack(-fill => 'x'); $fA->Label(-text => 'A')->pack(); $fB->Label(-text => 'B')->pack(); $fC->Label(-text => 'C')->pack(); MainLoop;

I've colour-coded the A,B and C frames so that the effects of resizing are more obvious.

— Ken

Replies are listed 'Best First'.
Re^2: Controlling resize of Tk::Panedwindow
by hv (Prior) on Mar 05, 2021 at 15:26 UTC

    Thanks, I'll keep that approach in mind as a last resort; I'd prefer to keep the sliders that permit manual readjustment of the pane sizes, but maybe I could live without them if it gets too tricky (and if I can be confident of ensuring the subsidiary panes are always at least big enough to reach their own varying content).

Re^2: Controlling resize of Tk::Panedwindow
by Anonymous Monk on Mar 02, 2021 at 08:37 UTC
    Missing adjusters