Code: Alles auswählen
class SListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin):
def __init__(self, parent):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VRULES
)
listmix.ListCtrlAutoWidthMixin.__init__(self)
for i, desc in ((0, "Date"),(1, "Time"),(2, "__name__"),(3, "Type"),(4, "Descriction")):
self.InsertColumn(i,desc) #Spalten erzeugen
items = serverlog.DBControl().auslesen()
self.InsertStringItem(maxint, '')
Code: Alles auswählen
return _controls_.ListCtrl_InsertStringItem(*args, **kwargs)
PyAssertionError: C++ assertion "m_count == ListView_GetItemCount(GetHwnd())" failed at ..\..\src\msw\listctrl.cpp(1583) in wxListCtrl::InsertItem(): m_count should match ListView_GetItemCount
Ich kann den Fehler nicht deuten, bzw ich nicht warum das nicht klappt.
Und was mich auch interessiert, warum man an der stelle index_to_place_at maxint nimmt.
Vielen Dank schonmal im voraus.