Abstract

This TIP proposes adding a paneconfigure option to
panedwindows that will allow alternative fill behavior.

Rationale

The current behavior, although reasonable, is too limiting. We should
give control to programmers so that they can specify the fill behavior
in a way that makes sense for their application.

Proposed Change

Currently, the panedwindow widget gives any remaining space (or
takes away space) from the last (right most or bottom most) pane only.
This proposal will add a per pane configure option so that any or all
panes may receive the additional space.

A -stretch option will be added to the paneconfigure list of
options. The value will be an enumeration of "last",
"first", "middle", "always", and "never". The
default value will be "last" which maintains the
panedwindow's current behavior. The panedwindow will
calculate the required size of all its panes. Any remaining (or
deficit) space will be distributed to those panes marked for
stretching. The space will be distributed based on each panes current
ratio of the whole. For example, given panes a, b, and c,
where only b and c are marked for stretching and b is 25%
of the size of (b+c), then b will receive 25% of the
surplus or deficit space.

The -stretch enumeration values have the following meaning:

last: Only if this pane is the last (right-most or bottom-most,
depending on overall orientation) pane will it stretch.

first: Only if this pane is the first (left-most or top-most,
depending on overall orientation) pane will it be stretch.

middle: Only if this pane is not the first or last pane will it
stretch.

always: This pane will always stretch.

never: This pane will never stretch.

Draft Implmentation

An implementation of this enhancement is availble
[ftp://ftp.model.com/pub/tcl/pwstretchTIP.tgz].