There are many paned window implementations, including a core one that was released in Tk 8.4.
http://www.purl.org/tcl/home/man/tcl8.4/TkCmd/panedwindow.htm
Also called tk::panedwindow in Tk 8.5.
Ttk, released in Tk 8.5, has a themed panedwindow: http://www.tcl.tk/man/tcl8.5/TkCmd/ttk_panedwindow.htm .
See also paned window.
Here is information on Iwidgets implementation:
Docs can be found at http://incrtcl.sourceforge.net/iwidgets/iwidgets/panedwindow.html (the example provided may be outdated and fail to work with the latest Tcl/Tk) and http://purl.org/tcl/home/man/iwidgets3.0/panedwindow.n.html
Some users with iwidget panedwindows in their apps find that, when moving to Tk 8.4 , their applications are now generating syntax errors. This is because the Tk panedwindow and iwidgets panedwindow widgets use the same class - however, they don't have the same bindings.
Tom Silva writes on the itcl mailing list: I use this code-fix in panedwindow.itk, in the Panedwindow constructor, down near the bottom (just before "eval itk_initialize $args").
set btags [bindtags $itk_component(hull)] if {[set ndx [lsearch -exact $btags Panedwindow]] >= 0} { bindtags $itk_component(hull) [lreplace $btags $ndx $ndx IPanedwindow] }
Prompted by an observation by Bryan Oakley that, whereas
[winfo manager $w] forget $w
does what one want for $w-s managed by pack, place, and grid, but not for panedwindow, Joe English offered this "interesting solution":
set scratch [winfo parent $w].__temp__ pack $w in $scratch pack forget $w destroy $scratch
RS 2006-01-29: Hacking a Tk panedwindow with eTcl on my phone, I wasn't sure whether to arrange panes horizontally or vertically. Well, thought I, let the user decide - took me 4 lines of code, plus the demo below. Right-click on the sash to toggle:
proc toggle'orientation w { $w config -ori [expr {[$w cget -ori] eq "horizontal"? "vert": "hori"}] }
#-- Demo and usage example:
pack [panedwindow .p] .p add [label .p.1 -text Hello] .p add [label .p.2 -text world] bind .p <3> {toggle'orientation %W}
Category Widget | Category Command, a part of Tk and incr Widgets |
---|