Remove item from a list control in xbmcgui
#1
I notice that in the xbmcgui module ListControl does not have a removeItem() method. Is there a reason why it doesn't?
Reply
#2
Just to be sure: You noticed that it has a reset()-method to clear all items?
My GitHub. My Add-ons:
Image
Reply
#3
Yep. I have a list that I need to update periodically, say modify some of the items, remove some others etc. Resetting and refilling causes the list to scroll to the top, then selectItem() scrolls the list so that the selected item is in the last visible line - both not very comfortable.
Reply
#4
In an add-on of type script I guess?
I am not sure if it will break anything, but you could also try to use "window_instance.removeControl(window_instance.getControl(ID))".
My GitHub. My Add-ons:
Image
Reply
#5
i thought there was a removeItem(), maybe it didn't get ported over with the swig change.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#6
It looks like there wasn't, so I submitted a patch to the repo.
Reply

Logout Mark Read Team Forum Stats Members Help
Remove item from a list control in xbmcgui0