Sizing inside splitter windows

Attached is a little mockup of the beginning of an interface for a
datamining application. It's my first attempt at using splitters. My
question is whether it is possible for the sizers that are in a splitter
window to act in response to the sizing of the enclosing frame.

As it is, there are a number of sizers in the top window, and the grid in
the bottom window is also within a sizer. If placed inside an outer sizer
in a wxFrame, these all act as you would expect. If placed in a wxWindow
that is put insider a splitter (as is the case here), the interior contents
of that window seem to become "static" and not resize. It occurs to me
that this may be the intended behavior -- that the model for a splitter
window is that it provides "views" into the windows it has split, but that
the interiors of these aren't subject to resizing.

What I would *like* to be able to do is to have the top window resize
horizontally (but not vertically) as I resize the application's frame. And
I would like to have the grid in the bottom window resize in both
directions as I resize the application's frame (and in fact as I move the
splitter's sash. Is something like this possible? Neither the example in
the demo or the example in the Wiki illustrates anything like this
behavior.

I do note that in the demo example of the SashedWindow, the subwindow
containing the TextCtrl *does* appear to resize when the sash is moved. Is
the same behavior possible with a Splitter? If not, should I just use a
SashedWindow instead of a Splitter for what I am attempting? Is this
simply the default behavior of a SashedWindow? How much control can one
exert over it?

Any guidance will be appreciated.

(See attached file: FactExplorer.py)

FactExplorer.py (3.84 KB)

···

--------------------------------------
Gary H. Merrill
Director and Principal Scientist, New Applications
Data Exploration Sciences
GlaxoSmithKline Inc.
(919) 483-8456

The problem is that you are using a wxWindow on each side of the splitter as the direct splitter children, and then making your two panels children of those two windows, but you don't specify in any way how the windows shoudl manage the size of the panels. The two windows are not needed however as the splitter is already managing the size of its two children just fine and can do the same with the panels where you've specifed sizers for their children. See attached.

FactExplorer.py (3.73 KB)

···

gary.h.merrill@gsk.com wrote:

Attached is a little mockup of the beginning of an interface for a
datamining application. It's my first attempt at using splitters. My
question is whether it is possible for the sizers that are in a splitter
window to act in response to the sizing of the enclosing frame.

As it is, there are a number of sizers in the top window, and the grid in
the bottom window is also within a sizer. If placed inside an outer sizer
in a wxFrame, these all act as you would expect. If placed in a wxWindow
that is put insider a splitter (as is the case here), the interior contents
of that window seem to become "static" and not resize. It occurs to me
that this may be the intended behavior -- that the model for a splitter
window is that it provides "views" into the windows it has split, but that
the interiors of these aren't subject to resizing.

What I would *like* to be able to do is to have the top window resize
horizontally (but not vertically) as I resize the application's frame. And
I would like to have the grid in the bottom window resize in both
directions as I resize the application's frame (and in fact as I move the
splitter's sash. Is something like this possible? Neither the example in
the demo or the example in the Wiki illustrates anything like this
behavior.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!