Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
neowinston
Visitor

How to get the string from a selected item in a LabelList?

I need to get the string from a selected item in a LabelList. From the docs I know that itemSelected gives me the index, but not the string. How do I get the selected string? Thank you!
0 Kudos
3 REPLIES 3
tim_beynart
Channel Surfer

Re: How to get the string from a selected item in a LabelList?

I think you need to use the index to look up the value from the LabelList data provider (peudocode, syntax may be wrong)

list.content[index].title
0 Kudos
neowinston
Visitor

Re: How to get the string from a selected item in a LabelList?

Thank you, Tim! You helped me a lot!
0 Kudos
ackmanx
Visitor

Re: How to get the string from a selected item in a LabelList?

For future reference of others, the specific code I had to use for your use case was:

m.setList.content.getChild(m.setList.itemSelected).title

Where m.setList was my LabelList.
0 Kudos