S
Sven Tissot
Hello,
I am trying to build an editable ListCtrl_edit via TextEditMixin.
It displays o.k. and I can edit the first field with this is the code piece:
class VokabelListCtrl(wxListCtrl,
listmix.ListCtrlAutoWidthMixin,
listmix.TextEditMixin):
def __init__(self, parent, ID, pos=wxDefaultPosition,
size=wxDefaultSize, style=0):
wxListCtrl.__init__(self, parent, ID, pos, size, style)
listmix.ListCtrlAutoWidthMixin.__init__(self)
#listmix.TextEditMixin.__init__(self)
uncommenting the TextEditMixin still renders the ListCtrl, but as soon
as I click into the grid the application crashes with a
IndexError: tuple index out of range
Traceback (innermost last):
File "/Users/einstein/python/wing/projects/vokabeln/wxVokabelApp.py",
line 1, in ?
#!/usr/bin/env python
File "/Users/einstein/python/wing/projects/vokabeln/wxVokabelApp.py",
line 26, in ?
main()
File "/Users/einstein/python/wing/projects/vokabeln/wxVokabelApp.py",
line 23, in main
application.MainLoop()
File "/Library/Python/2.3/wx-2.6-mac-unicode/wx/_core.py", line 7493, in
MainLoop
wx.PyApp.MainLoop(self)
File "/Library/Python/2.3/wx-2.6-mac-unicode/wx/_core.py", line 6926, in
MainLoop
return _core_.PyApp_MainLoop(*args, **kwargs)
File "/Library/Python/2.3/wx-2.6-mac-unicode/wx/lib/mixins/listctrl.py",
line 497, in OnLeftDown
x,y = evt.GetPosition()
File "/Library/Python/2.3/wx-2.6-mac-unicode/wx/_core.py", line 1117, in
__getitem__
def __getitem__(self, index): return self.Get()[index]
what is my mistake ??? Can anybody give me a hint ?
P.S. I installed the curent wxPython release and applied the following
* download and install
http://pythonmac.org/packages/TigerPython23Compat.pkg.zip
* used multiversion install via adding
o import wxversion
o wxversion.select("2.6")
kind regards,
Sven
I am trying to build an editable ListCtrl_edit via TextEditMixin.
It displays o.k. and I can edit the first field with this is the code piece:
class VokabelListCtrl(wxListCtrl,
listmix.ListCtrlAutoWidthMixin,
listmix.TextEditMixin):
def __init__(self, parent, ID, pos=wxDefaultPosition,
size=wxDefaultSize, style=0):
wxListCtrl.__init__(self, parent, ID, pos, size, style)
listmix.ListCtrlAutoWidthMixin.__init__(self)
#listmix.TextEditMixin.__init__(self)
uncommenting the TextEditMixin still renders the ListCtrl, but as soon
as I click into the grid the application crashes with a
IndexError: tuple index out of range
Traceback (innermost last):
File "/Users/einstein/python/wing/projects/vokabeln/wxVokabelApp.py",
line 1, in ?
#!/usr/bin/env python
File "/Users/einstein/python/wing/projects/vokabeln/wxVokabelApp.py",
line 26, in ?
main()
File "/Users/einstein/python/wing/projects/vokabeln/wxVokabelApp.py",
line 23, in main
application.MainLoop()
File "/Library/Python/2.3/wx-2.6-mac-unicode/wx/_core.py", line 7493, in
MainLoop
wx.PyApp.MainLoop(self)
File "/Library/Python/2.3/wx-2.6-mac-unicode/wx/_core.py", line 6926, in
MainLoop
return _core_.PyApp_MainLoop(*args, **kwargs)
File "/Library/Python/2.3/wx-2.6-mac-unicode/wx/lib/mixins/listctrl.py",
line 497, in OnLeftDown
x,y = evt.GetPosition()
File "/Library/Python/2.3/wx-2.6-mac-unicode/wx/_core.py", line 1117, in
__getitem__
def __getitem__(self, index): return self.Get()[index]
what is my mistake ??? Can anybody give me a hint ?
P.S. I installed the curent wxPython release and applied the following
* download and install
http://pythonmac.org/packages/TigerPython23Compat.pkg.zip
* used multiversion install via adding
o import wxversion
o wxversion.select("2.6")
kind regards,
Sven