How to make selectable ListView?

I need make listView to select server from list. But when I add labels to List it’s not selectable. How to make label in listview selectable?

Not selectable means what? You’ll have to attach touch event listener to each item on the list. And based on the target would have to find which list item was selected.

ok, thanks. I will try it. if you have simple example it will be more good.

You have cocos2d-x tests. It mostly has everything you need. Just try, otherwise, I can try writing a solution.

can you please share Cocos2d-x test link?

Cocos2d-x test isn’t a link. It’s a project. Just find it inside the cocos2d-x framework you downloaded. You would have to build it and run it as an app.

I want to make something like this steam servers list, but very simple. And I don’t find in tests how to highlight text string like this servers list with highlight line or maybe better to use buttons for this not text labels.

Did you try running the tests and checking out list view in them?
In there, you can get everything you want. Just work a bit, if you don’t get then you can post the code which you’re not understanding :smile: