Python Forum
[WxPython] ultimatelistctrl problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[WxPython] ultimatelistctrl problem
#1
I can't get ULC to getitem. Even in the demo (report version) clicking an item prints "self.currentItem = event.Index AttributeError: Index"
The code is identical to the standard wx.listctrl, it just doesn't work in ultimate.
Any ideas?
Thanks
Reply
#2
It would be most useful to see some code.
Reply
#3
Hello,

I didn't post code as the problem is in the wxpython demo. I thought it reasonable to assume that anybody who may be able to help would already have the demo installed and could see the problem almost instantly...
Reply
#4
More details:
Windows 10 (1607)
Python 3.6.3
wxpython 4.0.0b2

My problem is clearly apparent in the 4.0.0b2 demo, clicking on an item in ultimatelistctrl (report or list view) returns:

Traceback (most recent call last):
File "agw\UltimateVirtualDemo.py", line 87, in OnItemSelected
self.currentItem = event.Index
AttributeError: Index

or:

Traceback (most recent call last):
File "agw\UltimateReportDemo.py", line 802, in OnItemDeselected
self.log.write("OnItemDeselected: %d\n" % evt.Index)
AttributeError: Index
Traceback (most recent call last):
File "agw\UltimateReportDemo.py", line 782, in OnItemSelected
self.currentItem = event.Index
AttributeError: Index

Basically the same error. Help! Cry
Reply
#5
I tried all of them and they work for me.
I have pretty much the same environment as yourself, except I run windows 7.

I wonder if this has to do with the way you are running the demo.
You should navigate to the demo directory
and from command line run:

python demo.py
then click on AGW/UltimateListCtrl
Reply
#6
No, that isn't it. The demo is working fine in every other respect. Weird. I guess I will have to try uninstalling everything and re-installing, a pain because of all the modules I've added over time!
Reply
#7
Update: I just dug out a win7 machine and installed python 3.6.3 and wxpython 4.0.0b2, exactly the same error.
Reply
#8
This is not the answer you are seeking,
but, I don't know why.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020