Hi,
could anybody please tell me what's wrong with the following code?
I have no idea where this EvtHandler comes from.
Thanks,
Marcus
from wxPython.wx import *
from wxPython.grid import *
···
#---------------------------------------------------------------------------
class PTG(wxGrid):
def __init__(self, parent):
wxGrid.__init__(self, parent, -1)
rowlabel=['1','2','3']
collabel=['a','b','c']
rownum=3
colnum=3
datalist=['1','2','3','4','5','6','7','8','9']
self.CreateGrid(3,3)
#---------------------------------------------------------------------------
class TestFrame(wxFrame):
def __init__(self, parent):
wxFrame.__init__(self, parent, "Grid Test", size=(640,480))
grid = PTG(self)
#---------------------------------------------------------------------------
if __name__ == '__main__':
app = wxPySimpleApp()
frame = TestFrame(NULL)
frame.Show(true)
app.MainLoop()
#---------------------------------------------------------------------------
#16:44:04: There were memory leaks.
#16:44:04: ----- Memory dump -----
#16:44:04: wxEvtHandler at $1506F68, size 48
#16:44:04:
#16:44:04:
#16:44:04: ----- Memory statistics -----
#16:44:04: 1 objects of class wxEvtHandler, total size 48
#16:44:04:
#16:44:04: Number of object items: 1
#16:44:04: Number of non-object items: 0
#16:44:04: Total allocated size: 48
#16:44:04:
#16:44:04: