This page describe what a paned window is, and where to find implementations.
A paned window is widget consisting of two windows with a bar down the middle, where the bar has a handle for resizing the two windows.
Tcl/Tk 8.4 has a panedwindow, and a spinbox as well as a labelframe. The panedwindow was the result of TIP 41 [L1 ] which proposed a built-in PanedWindow.
Ro: I always find that I need some examples to get started with a widget. So here is a simple example that should get you started with the panedwindow from Tk 8.4 (be sure to check out the man page [L2 ] for details)
package require Tk 8.4 panedwindow .pw -orient vertical label .pw.x1 -text Bapy -fg orange -bg black label .pw.x2 -text Mojo -fg white -bg red .pw add .pw.x1 -minsize 200 .pw add .pw.x2 -minsize 100 pack .pw -fill both -expand yes
Maximize the window to see how you can alter the sizes of the panes, while respecting the minsize that was chosen by the config option -minsize .
The widgets that you add to the panedwindow MUST be children of the panedwindow, in this case they must be .pw.something .
On windows, mouse-button-1 resizes the panes once you let go of the sash, whereas mouse-button-2 resizes the panes as you move the sash.
If you're looking for a good Tcl/Tk 8.4 implementation, be sure to check out tclkit and starkit.
BWidgets [L3 ] has a PanedWindow.
ClassyTk [L4 ] has a Paned widget.
obTcl [L5 ] has a paged window widget.
Jeffrey Hobbs' widget package [L6 ] includes a pure-Tcl geometry-manager-like-thing that serves as a paned window.
Iwidgets [L7 ] (based on itk) includes a panedwindow.
[Does Perl/Tk have a Pane widget?]
[ Category GUI | ]