Forum Discussion
Hello! Have you written the search functionality? A search function? If so, it is as simple as adding a button in your XML file and the BrightScript file, observing the field and adding the function. Like so, in XML:
<children>
<Button
id="searchButton"
text = "Search Button"
showFocusFootprint = "true"
/>
</children>Now BrightScript brs file:
sub init()
m.searchButton = m.top.findNode("searchButton")
m.searchButton.observeField("buttonSelected","searchFunction")
end sub
function searchFunction()
//your code and logic
end functionFurther reading, Roku docs for button: https://developer.roku.com/en-gb/docs/references/scenegraph/widget-nodes/button.md
I hope this helps!
thank you so much i was a little lost.
- Uzair_Abdullah3 years agoStreaming Star
Glad to know it helped!
- silentEngineer3 years agoChannel Surfer
so i added a function that opens a keyboard when i click the search button but if i keep clicking down button the focus goes out of the keyboard and onto the grid screen. If i keep clicking left it loops through to the other side. How to do that for up and down also?
- Uzair_Abdullah3 years agoStreaming Star
Your question would be more clear if you also posted a screenshot of your UI. Then rephrase your question, thanks.