Forum Discussion

Uzair_Abdullah's avatar
Uzair_Abdullah
Streaming Star
3 years ago

Can't set text as RowList content

Why is RowList so hard to manipulate? And even the samples are vague. I want to set some text in rowlist, i.e., my rowlist should display a heading inside of it, rather than images, which can be horizontally scrollable. But I can't get that to happen. The docs aren't very helpful either. 
Here's the RowList in XML:

 

    <field id="content" type="node" alias="RowList.content" />
    <field id="rowItemSelected" type="intarray" alwaysnotify="true" alias="RowList.rowItemSelected" />
    <field id="jumpToRowItem" type="intarray" alias="RowList.jumpToRowItem" />


    <Rowlist
      itemComponentName="RecentSearchesRowListItemComponent"
      id="rowList"
      translation="[550,540]"
      itemSize="[ 170, 140 ]"
      showRowLabel="[false]"
      drawFocusFeedback="[true]" />

 

 

The item component in a separate file:

 

<field id="itemContent" type="node" onChange="OnContentSet" />        


      <ScrollingLabel 
            id = "title" 
            maxWidth = "300" 
            height = "0" 
            font = "font:MediumBoldSystemFont" 
            horizAlign = "left" 
            vertAlign = "top" 
            text=""
        />

 

 

And here's my brs code where I am trying to set the title of the rowList:

 

m.recentSearches = m.top.findNode("rowList")

 getQueries()

function getQueries()
    queries = RegRead("queries")
    print "Raw unparsed queries: " queries
    if queries <> invalid
        queriesJson = ParseJson(queries)
        print "Parsed queries: " queriesJson
        if queriesJson <> invalid
            for each regQuery in queriesJson
                m.recentSearches.title = regQuery.query
            end for
        end if
    end if
end function

 

What am I missing here? 

2 Replies