|
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-10-23 13:37:20
|
On Wed, 22 Oct 2008 08:38:22 +0100, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX wrote:
> I'll do some more investigation to see whether this is an OSX bug in GetBestSize().
Hmmm....looks like another issue that arrived with wxPython 2.8.x. I created the following non-PythonCard application:
import wx
class DemoFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self,None,-1,"Test",size=(400,400))
self.list = wx.ListCtrl(self,-1,style=wx.LC_REPORT,size=(300,100))
self.list.InsertColumn(0,"Column1")
self.list.InsertColumn(1,"Column2")
print "__init__:\nList GetBestSize: ", self.list.GetBestSize(), "Current: ", self.list.GetSize()
self.button = wx.Button(self,-1,"Button",pos=(200,200),size=(100,50))
print "Button GetBestSize: ", self.button.GetBestSize(), "Current: ", self.button.GetSize()
app = wx.PySimpleApp()
frame = DemoFrame()
frame.Show()
app.MainLoop()
and ran it on a few platforms:
OSX 10.4 + wxPython 2.5.3.1:
List GetBestSize: 100,80 Current: 300,100
Button GetBestSize: 70,20 Current: 100,50
OS 10.4 + wxPython 2.8.9.1:
List GetBestSize: 300,100 Current: 300,100
Button GetBestSize: 70,20 Current: 100,20
XP + wxPython 2.8.9.1:
List GetBestSize: 100,80 Current: 300,100
Button GetBestSize: 75,23 Current: 100,50
So GetBestSize() looks broken on OS 10.4 + wxPython 2.8.9.1 for multi-column lists. Setting the button height to 50 didn't work either.
--
XXXXXXXXXXX
|