-
Name
-
Pmw.PanedWidget() -
frame subdivided into several resizable panes
-
Inherits
-
Pmw.MegaWidget
-
Description
-
This class creates a manager widget for containing resizable
frames, known as panes. Each pane may act as the container for
other widgets. The user may resize the panes by dragging a small
rectangle (the handle) or the line between the panes (the separator).
-
Options
-
Options for this megawidget and its base
classes are described below.
- command
-
Specifies a function to be called whenever the size of any of the
panes changes. The function is called with a single argument,
being a list of the sizes of the panes, in order. For vertical
orientation, the size is the height of the panes. For
horizontal orientation, the size is the width of the panes. The default is None.
- orient
-
Initialisation option. Specifies the orientation of the paned widget. This may be
'horizontal' or 'vertical'. If 'vertical', the panes are
stacked above and below each other, otherwise the panes are laid
out side by side. The default is 'vertical'.
- separatorrelief
-
Initialisation option. Specifies the relief of the line separating the panes. The default is 'sunken'.
-
Pane options
-
Each pane has the following options. These may be set when
creating or configuring a pane. The value of each option may
be an integer, which specifies a pane size in pixels, or a
real number, which specifies a pane size proportional to the
size of the entire paned widget.
- size
- Specifies the initial size of the pane. The default is 0.
- min
- Specifies the minimum size of the pane. The default is 0.
- max
- Specifies the maximum size of the pane. The default is a
very large number.
-
Components
-
Components created by this megawidget and its base
classes are described below.
- hull
-
This acts as the body for the entire megawidget. Other components
are created as children of the hull to further specialise the
widget. By default, this component is a Tkinter.Frame.
-
Dynamic components
-
Frame, separator and handle components are created dynamically
by the add()
method. The components are of type
Tkinter.Frame and are created with component groups of
Frame, Separator and Handle respectively.
-
Methods
-
Only methods specific to this megawidget are described below.
For a description of its inherited methods, see the
manuals for its base classes.
- add(name, **kw)
-
Add a pane to the end of the paned widget using the component name
name. This is equivalent to calling
insert()
with before
set to the current number of panes. The method returns the name
component widget.
- configurepane(name, **kw)
-
Configure the pane specified by name, where name is either an
integer, specifying the index of the pane, or a string, specifying
the name of the pane. The keyword arguments specify the new
values for the options for the pane. These options are described
in the Pane options section.
- insert(name, before = 0, **kw)
-
Add a pane just before (that is, to the left of or above) the pane
specified by before, where before is either an integer,
specifying the index of the pane, or a string, specifying the name
of the pane. The keyword arguments specify the initial values for
the options for the new pane. These options are described in the
Pane options section. To add a pane to the end of the paned
widget, use
add()
.
The new pane is created as a Tkinter.Frame component named name.
If this is not the only pane, a separator and handle are also
created as components named separator-n and handle-n,
where n is the index of the new pane (a number between 0 and one
less than the number of panes). The method returns the name
component widget.
- pane(name)
-
Return the Tkinter.Frame pane widget for the pane specified by
name, where name is either an integer, specifying the index of
the pane, or a string, specifying the name of the pane.
- panes()
-
Return a list of the names of the panes, in display order.
- remove(name)
-
Remove the pane specified by name, where name is either an
integer, specifying the index of the pane, or a string, specifying
the name of the pane.