The Pane Manager

The relative size and placement parameters of the place command can be used to create custom geometry managers. Example 25-5 shows a paned layout manager. Two frames, or panes, are placed inside another frame. A small third frame represents a grip that is used to adjust the boundary between the two panes:

Example 25-5 Pane_Create sets up vertical or horizontal panes.

 proc Pane_Create {f1 f2 args} { # Map optional arguments into array values set t(-orient) vertical set t(-percent) 0.5 set t(-in) [winfo parent $f1] array set t $args # Keep state in an array associated with the master frame set master $t(-in) upvar #0 Pane$master ...

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.