rawpython / remi

Python REMote Interface library. Platform independent. In about 100 Kbytes, perfect for your diet.
Apache License 2.0
3.51k stars 401 forks source link

How to delete my selected item using listview #451

Closed Ah-Q closed 3 years ago

Ah-Q commented 3 years ago

I recently learned remi. When using listview, I want to delete the selected item, but after observing the source code, I found that the corresponding function was not found. How should I delete the selected item?

dddomodossola commented 3 years ago

Hello @Ah-Q , to remove a widget from a parent you can do parent.remove_child(child_instance). In your case you should do

listview.remove_child(listview.children[listview.get_key()])

Kind Regards

Ah-Q commented 3 years ago

Hello @Ah-Q , to remove a widget from a parent you can do parent.remove_child(child_instance). In your case you should do

listview.remove_child(listview.children[listview.get_key()])

Kind Regards This problem has puzzled me for a long time, and now it has been solved by you. Thank you very much