Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Controlling resize of Tk::Panedwindow

by kcott (Archbishop)
on Mar 02, 2021 at 07:47 UTC ( [id://11129002]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11129002]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-20 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found