wx.ScrolledWindow, SetMaxSizer

> Assuming you are getting a good size for the scrolled window's best
> size, then perhaps this would work:
>
> frame.SetMaxSize(
> frame.ClientToWindowSize(scrolled.GetBestSize()))
>
> Or I suppose you could use the size of the bitmap there instead.

Thanks for that hint. Looks like i need to update wxPython to get
those. But it looks like these calls can help.

Hi,

i just updated to wxPython-2.8.8.1 and that call helps.

But it shows another behaviour that i don't like:

I derive a class RieFrame from wx.Frame
In there i place a wx.ScrolledWindow.
I load a Bitmap with self.zw, self.zh
I call:
self.SetMaxSize(self.ClientToWindowSize(wx.Size(self.zw, self.zh)))

When i now maximise the Frame it _could_ display the whole Bitmap,
but there are still the Scrollbars around.

As a workaround in wx.EVT_SIZE() i check the size of the window
and change the scrollbars:

    def OnSize(self, evt):
        (sw, sh) = evt.GetSize()

        if sw >= self.zw and sh >= self.zh:
            self.sw.SetScrollbars(1, 1, 1, 1)
        else:
            self.sw.SetScrollbars(1, 1, self.zw, self.zh)

Is there a better way to do this?

Thanks for any hints,
Torsten.