I have a wxGrid that has to fit into a relatively small vertical space
in my GUI, but is initially unpopulated, and so has no vertical scrollbar
initially. As users take action, the grid is populated with new rows,
and it only takes a few rows to make one show up. Feedback I've gotten
suggests that I somehow make the vertical scrollbar visible "all the time",
even if there's no (non-headr) rows in the grid yet, so that it's obvious
that this will happen. Is this possible, and if so, how do I do it while
still preserving the ".FitInside()" semantics as the grid grows in length?
I have a wxGrid that has to fit into a relatively small vertical space
in my GUI, but is initially unpopulated, and so has no vertical scrollbar
initially. As users take action, the grid is populated with new rows,
and it only takes a few rows to make one show up. Feedback I've gotten
suggests that I somehow make the vertical scrollbar visible "all the time", even if there's no (non-headr) rows in the grid yet, so that it's obvious
that this will happen. Is this possible, and if so, how do I do it while still preserving the ".FitInside()" semantics as the grid grows in length?
grid's for some reason don't like to show their scrollbars when packed inside another frame. My solution is to "fake" a resize of the grid.
# The scroll bars aren't resized (at least on windows) # Jiggling the size of the window rescales the scrollbars h,w = grid.GetSize() grid.SetSize((h+1, w)) grid.SetSize((h, w))
This won't change the size of the grid or window and viola, the scrollbars appear.
I have a wxGrid that has to fit into a relatively small vertical space
in my GUI, but is initially unpopulated, and so has no vertical scrollbar
initially. As users take action, the grid is populated with new rows,
and it only takes a few rows to make one show up. Feedback I've gotten
suggests that I somehow make the vertical scrollbar visible "all the time", even if there's no (non-headr) rows in the grid yet, so that it's obvious
that this will happen. Is this possible, and if so, how do I do it while still preserving the ".FitInside()" semantics as the grid grows in length?
Not that I know of. Would starting the grid with a bunch of empty rows be okay?
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!