wxPython SetPosition bug???

but

object.SetPosition( wx.Point( 5, 40000 ) ) →
PROBLEM:::::::>>>> the object.GetPosition() return ( 5, 32767 )

What is 32767 ???

I’ve been wondering the same thing myself. I ran across this interesting behavior when writing tests for methods like SetPosition, SetSize, SetClientSize, etc. In various cases, there are (seemingly) arbitrary ceilings and floors on what these values can be set to.

I’m wondering if this comes from wxWidgets, or wxPython, or something platform-specific?

What platform are you on? I’ve seen 32767 mainly on Windows with wx.Window classes specifically.

This behavior caused a lot of test failures until I developed (what I consider to be) a workaround. The getSizes function in testSizes.py will determine the maxima and minima experimentally, and then generate a data set between these extrema to test the various Set/Get methods with.

http://svn.wxwidgets.org/viewvc/wx/wxPython/branches/SOC2007_UNITTEST/tests/unittest/testSize.py?view=markup

Since I don’t know why some widgets behave like this, I don’t know if this is a good solution. Any ideas?

-Frank