I've a MiniFrame, with just 1 grid of 2 columns on it.
Now I want the grid to fill the whole frame in it's width.
So I want column = 0 to be fixed and column = 1 to be adapted to the width of the frame.
I use the code below, and if I make the grid 30 points smaller than the frame,
it most of the times works.
But if I make the number smaller than 30, most of the times the vertical scrollbar appears.
How do I prevent that the vertical scrollbar appears ?
My relevant code is below.
(btw if I resize column=0, I adapt the width of column =1,with the same problem)
I've a MiniFrame, with just 1 grid of 2 columns on it.
Now I want the grid to fill the whole frame in it's width.
So I want column = 0 to be fixed and column = 1 to be adapted to the width of the frame.
I use the code below, and if I make the grid 30 points smaller than the frame,
it most of the times works.
But if I make the number smaller than 30, most of the times the vertical scrollbar appears.
How do I prevent that the vertical scrollbar appears ?
This is a problem with how the wx.ScrolledWindow is implemented. Since it has fixed size scroll increments it always rounds the virtual size up to an even multiple of the scroll increment, so unless your virtual size is already an even multipl you end up with needing a bit of extra unexpected space in order to make the scrollbars be unnecessary.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I've a MiniFrame, with just 1 grid of 2 columns on it.
Now I want the grid to fill the whole frame in it's width.
So I want column = 0 to be fixed and column = 1 to be adapted to the width of the frame.
I use the code below, and if I make the grid 30 points smaller than the frame,
it most of the times works.
But if I make the number smaller than 30, most of the times the vertical scrollbar appears.
How do I prevent that the vertical scrollbar appears ?
This is a problem with how the wx.ScrolledWindow is implemented. Since it has fixed size scroll increments it always rounds the virtual size up to an even multiple of the scroll increment, so unless your virtual size is already an even multipl you end up with needing a bit of extra unexpected space in order to make the scrollbars be unnecessary.
thanks Robin,
I tried some other tricks, jiggling the width a bit up and down,
but indeed nothing at the top level seems to work reliable.
So I just have to except that.