|Title:||Add -stretch Option to panedwindow Widget|
|Version:||$Revision: 1.5 $|
|Author:||Brian Griffin <bgriffin at model dot com>|
|Created:||Wednesday, 17 March 2004|
This TIP proposes adding a paneconfigure option to panedwindows that will allow alternative fill behavior.
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.
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:
Only if this pane is the last (right-most or bottom-most, depending on overall orientation) pane will it stretch.
Only if this pane is the first (left-most or top-most, depending on overall orientation) pane will it be stretch.
Only if this pane is not the first or last pane will it stretch.
This pane will always stretch.
This pane will never stretch.
An implementation of this enhancement is availble .
This document has been placed in the public domain.
[Index] [History] [HTML Format] [Source Format] [LaTeX Format] [Text Format] [XML Format] [*roff Format (experimental)] [RTF Format (experimental)]TIP AutoGenerator - written by Donal K. Fellows