I want to delete items 开发者_运维技巧and refresh it. I have been trying for 2 days, no luck.
listField.delete(index)
doesn't work.
If you can provide me appropriate solution, I will give you all of my reputation.
You'll probably have to override it to remove the item from your data backing the list, and then call listField.setSize(newSize)
. Since it doesn't know what sort of data structure you are using to push elements into it, it can't be sure how to remove them.
For example, if you have a Vector that stores your data, override delete()
to remove the element, and then call setSize(vector.size())
. If your ListFieldCallback is stored somewhere else, just make a wrapper call to a similar delete()
method in your callback.
精彩评论