I’m using widgets 2.0. I have a table view and when I’m touching a row the text color change. When I’m touching a different row the text color change too but the previous text change to his original only if I scroll the table view and the row dissapears from the screen and appears again (I’m using the params table to manipulate the color of the text object between the onRowRender and the onRowTouch functions).
I think the solution is to run a for loop to change the color of all row texts except from the target or to change the color of previous row from the onRowTouch function. But I can’t find a way to have access onRowTouch to the text objects of the other rows.
In your onRowTouch you can listen for the “release” and tap phases and set the row’s color back if you want it to reset when they lift the finger. If not, you will have to loop over all rows, reset them, then set the color on the currently touched row.
My problem is the access of all row text objects in onRowTouchFunction in order to run a for loop. I don’t know the syntax. Is this correct: tableView._view._rows[i].textObject:setTextColor(0, 0, 0)?
In your onRowTouch you can listen for the “release” and tap phases and set the row’s color back if you want it to reset when they lift the finger. If not, you will have to loop over all rows, reset them, then set the color on the currently touched row.
My problem is the access of all row text objects in onRowTouchFunction in order to run a for loop. I don’t know the syntax. Is this correct: tableView._view._rows[i].textObject:setTextColor(0, 0, 0)?