[wxPython-users] ScrolledWindow sizing issues

James Bigler bigler at cs.utah.edu
Fri Mar 9 05:48:02 PST 2007


Robin Dunn wrote:
> James Bigler wrote:
>> I almost have what I want.  I found out how to make a table show up 
>> without any scrollbars by adjusting the sizes of the columns.  The 
>> problem I'm having now is how to place it inside my dialog with a 
>> ScrolledWindow.
> 
> You were close.  I took out the extra panel as it just gets in the way 
> how you were using it.  (Although you should probably have one at the 
> top level as the only child of the frame, and put everything else on it 
> instead of directly on the frame.)  Then I put the call to SetScrollRate 
> back in so the scrolled window's scrollbar will be activated, and set 
> the minsize of the scrolled window to the best width of the scrollbar so 
> the sizer it is put in will keep it at that width.


Thanks so much for looking at this for me.  I've been battling this for 
a couple of weeks off and on.  Unfortunately for various versions it is 
hit and miss in doing what I need.

Windows, wxPython 2.8.1.1 (WinXP) : Has horizontal scrollbar on Grid to 
start.  If you resize until the vertical scrollbar goes away, the 
horizontal one also disappears.  Playing around with the sizes, I notice 
that the grid has both the H and V scrollbars.  The V scrollbar is 
hidden under the ScrolledWindow's V scrollbar, but it's there.

Linux, wxPython 2.5.3 (Suse 9.3):

Linux, wxPython 2.6.1.1 (Ubuntu 5.10): Looks OK to start (no horizontal 
scroll bar on the bottom).  It resizes properly until it gets tall 
enough to eliminate the vertical scroll bar, and then it no longer 
refreshes (looks like it breaks somehow) and becomes unresponsive.

Windows, wxWidgets 2.6.3 (WinXP): Behaves much the same as the wxPython 
2.8.1.1 version.

Robin, thanks for all your help, but I think I need to abandon this 
approach for now.  I have to get something working, and this is too 
finicky.  I'm trying to get a similar look with some static text boxes 
(see other post), and that seems to be a viable alternative (though not 
as pretty as a grid).  If I really need to get the grid version working, 
I think I'll just have to implement my own custom widget that I can 
control how it behaves.

Thanks again for all your help.  It's really nice to actually have 
someone respond to my posts.  All my posts to the wx-users mailing list 
have gone unanswered.

James




More information about the wxpython-users mailing list