Need layout help

Udo Baumgart ubit.de at gmx.de
Tue Jan 16 14:32:50 PST 2007


On Tue, 16 Jan 2007 20:55:17 +0100, Manuel Martín <mmartin at ceyd.es> wrote:

> Hi
> Sizers to manage scrollwindows contents don't match very well.

 From the documentation:

-----------------------------------------------
The most automatic and newest way is to simply let sizers determine the  
scrolling area. This is now the default when you set an interior sizer  
into a wxScrolledWindow with wxWindow::SetSizer. The scrolling area will  
be set to the size requested by the sizer and the scrollbars will be  
assigned for each orientation according to the need for them and the  
scrolling increment set by
-----------------------------------------------

I read this as: Sizers can be used inside a scrolledWindow and
SHOULD work. The doc is a little bit rare on this context though...

In my case there seems to be a bug, because the scrolledWindows
grows without need. The elements in it (and controlled by a
simple boxsizer) are fixed. Nevertheless the interior of the
scrolledwindow grows at least in x-direction. And more: Even
if a define the parent flexgrid column to be NOT GROWABLE, the
layout resizes the column containing the scrolledwindow! In my
understanding at least THIS should happen NEVER, shouldn't it?

I know, that i can work around this, but...
The contents of the scrolledwindow in my real application (the
shown code is just for demonstrating the problem) contains a
changing number and type of elements. If i use a panel inside
the scrolledwindow, then i have to set the virtual size of the
scrolledwindow every time the contents changes. Bad. I though
that sizers should be usable to design a user interface which
is independend of the actual style (fonts, size etc.) of user
interface elements. There SHOULD be a way of doing so even
with wxScrolledWindow...

Another point: Although i created the scrolledwindow with
wxVERTICAL only a horizontal scrollbar appears... I am unable
to restrict a sizer-controlled wxScrolledWindow to vertical
scrolling only...

Ciao, Udo




More information about the wx-users mailing list