I'm struggling to describe this coherently, but I think you'll get the
idea.
If you run GridSimple.py and then scroll to the right, eventually you end
up displaying the last column (Y). If you then try to resize the window to
the right, it doesn't add more space to the *right* of Y but instead drags
out to display more columns on the left. This is unlike the other grid
demos which just drag out by adding more space on the right of the grid,
resulting in a rather ugly and useless display of blank space on the
righthand side.
But in looking at the code, I can't see how GridSimple.py implements this
behavior. What am I missing here?
Beyond that, I have a window in which I now have three wxGrids (two beside
one another at the top, and one below them that occupies the entire width
of the window). Is there a straightforward way to set various attributes
so that when this window is resized the grids all resize only by changing
the size of their last columns (and without, on expansion, displaying blank
space to the right of those columns)?
···
--------------------------------------
Gary H. Merrill
Director and Principal Scientist, New Applications
Data Exploration Sciences
GlaxoSmithKline Inc.
(919) 483-8456
I'm struggling to describe this coherently, but I think you'll get the
idea.
If you run GridSimple.py and then scroll to the right, eventually you end
up displaying the last column (Y). If you then try to resize the window to
the right, it doesn't add more space to the *right* of Y but instead drags
out to display more columns on the left. This is unlike the other grid
demos which just drag out by adding more space on the right of the grid,
resulting in a rather ugly and useless display of blank space on the
righthand side.
But in looking at the code, I can't see how GridSimple.py implements this
behavior. What am I missing here?
That is the general behavior of scrolled windows. When the virtual size exceeds the physical size of the window then it tries to keep visible as much of the content as possible. In the situations where you see it just adding more space then that is because all of the content (in that direction anyway) is already visible.
Beyond that, I have a window in which I now have three wxGrids (two beside
one another at the top, and one below them that occupies the entire width
of the window). Is there a straightforward way to set various attributes
so that when this window is resized the grids all resize only by changing
the size of their last columns (and without, on expansion, displaying blank
space to the right of those columns)?
You could probably do it similarly to how the wxListCtrlAutoWidthMixin works. See wxPython/lib/mixins/listctrl.py
···
gary.h.merrill@gsk.com wrote:
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!