Errors after deleting items from an ultimatelistctrl

Hi,

···

On 26 June 2012 21:15, Ankur Dahiya wrote:

I have an UltimateListCtrl with multiple column. 1 column contains wxPanels
(via SetItemWindow).
Now, I want to clear the whole list (i.e. delete all items) and add new
items.
I do this by:

frame.lst.DeleteAllItems()
frame.Refresh()

and then add more items.
My problem is that the GUI becomes sluggish after this, the new items are
not drawn properly
and some remanants of old items are visible sometimes.
The following error is also printed hundreds of times:

Traceback (most recent call last):
File "wx\lib\agw\ultimatelistctrl.pyc", line 7105, in OnPaint
File "wx\lib\agw\ultimatelistctrl.pyc", line 6681, in GetLineHighlightRect
File "wx\lib\agw\ultimatelistctrl.pyc", line 6601, in GetLineRect
File "wx\lib\agw\ultimatelistctrl.pyc", line 6578, in GetLineY
File "wx\lib\agw\ultimatelistctrl.pyc", line 6354, in GetLine
IndexError: list index out of range

This happens on a Windows machine (wx-2.8.12.1, python 2.7.3) whereas it
works fine on Ubuntu (wx-2.8.12.1, python 2.7.3).

Please try the SVN version of ULC and see if the problem is still there:

http://svn.wxwidgets.org/viewvc/wx/wxPython/3rdParty/AGW/agw/ultimatelistctrl.py?sortby=date&view=log

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/