Forum Discussion
11 Replies
- Uzair_AbdullahStreaming Star
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!
- devCodezyngReel Rookie
thank you so much i was a little lost.
- Uzair_AbdullahStreaming Star
Glad to know it helped!
- dhacker29Newbie
Is their an example anywhere of how to add the search functionality to a channel?