Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

ListView - Can an Item's Event Handler Call Focus on a Different Item's Element?

$
0
0

I have a ListView with 2 templates, item with button and item with text field. Let's say there are just 2 rows/items, 1 button and 1 text field. When I click the button, I want to focus the text field. Is this possible?

I see from the KitchenSink example list_itemsupdate.js that we can interact with the text field's value or other properties set at creation time. But how to focus on the element?

Things I've tried in my button click event listener:

e.section.items[1].myTextField.focus();
listView.sections[0].getItemAt(1).myTextField.focus();

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>