Hi All,
my working environment is WinXP SP2, Python 2.3.4 and wxPython 2.5.2.7.
Starting with this new wxPython release I encountered a problem with the
ListCtrl method SetSingleStyle. Below is a code fragment that worked
fine in wxPython 2.4 and 2.5 until 2.5.1.5.
class CAppFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition,
wx.Size(640, 480))
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow);
self.mainmenu = wx.MenuBar()
menu = wx.Menu()
# snip
self.SetMenuBar(self.mainmenu)
self.list = wx.ListCtrl(self, ID_LCTRL, style = wx.LC_REPORT)
self.list.InsertColumn(0, 'Datum')
self.list.InsertColumn(1, 'Url')
self.list.SetColumnWidth(0, 110)
self.list.SetColumnWidth(1, 500)
self.list.SetSingleStyle(wx.LC_HRULES) # problem in 2.5.2.7
self.CreateStatusBar(2)
self.SetStatusWidths([-1, 150])
self.SetStatusText('nicht verbunden', 1)
# snip
When I start the application, there is no listcontrol and no
errormessage. If I delete the marked line, the listcontrol is fine. What
is wrong with the code?
Frank Mersmann