Deleting Item from List on Thunkable X

listview
beginner

#1

I’m getting an issue with deleting items. The index it seems to select, and therefore delete, is always the one at the top of the list as seen in the screenshots here:

** I was pressing the item at the very bottom (A)

And here’s my codeblock:
image
It would be really helpful to receive your input on this. Thank you!


#2

An example works well for me.


#3

No, I jumped to review. I see the oddity. If to remove in this order ADB, then C can only be removed when re-pressing it. When you first click on the remaining C, it is not removed! One remaining item in the list is not deleted the first time.

https://x.thunkable.com/projects/5bfece2f2ceade68e43fab5b/project/properties/designer/


#4

I believe the problem is that you are modifying the List_Viewer2.TextItems and hoping that it will correctly modify the List_Viewer display. You need to explicitly set the List_Viewer2.TextItems property to correctly redisplay the List Viewer. See the following for a updated version of @actech’s example: https://x.thunkable.com/copy/c1d586b791dc3322b90de618f1eddf67

-Mark