how do I test whether an item in a listview is selected or not?