[wx 2.8.4.0, MacOS X,
Python 2.4.4] wxScrolledWindow Child Misplacement
Jens Thiede
jensthiede at gmail.com
Tue Jun 19 08:23:31 PDT 2007
On MacOS X, the wxScrolledWindow starts with its content correctly
aligned. Scrolling to the far right, however, offsets the
wxScrolledWindow's child to the left by a random amount. This
misalignment doesn't change on subsequent scrolling once the window
was scrolled to the left and back to the right.
It seems to me that it may be a bug in wxWidgets itself. The following
code should reproduce the error on MacOS X in a similar configuration.
-- Code Starts --
import wx
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "Widget Test", pos=(150,
150), size=(350, 200))
panel = wx.Panel(self)
sw = wx.ScrolledWindow(panel, -1, size=(200, 70),
style = wx.SUNKEN_BORDER)
button = wx.Button(sw, -1, "Blah Blah Blah Blah Blah Blah Blah
Blah Blah Blah Blah Blah")
sw.SetVirtualSize(button.GetSize())
sw.SetScrollRate(20, 0)
-- Code Ends --
Is there a known workaround or is this just a bug?
Happy Coding,
Jens Thiede
More information about the wx-users
mailing list