Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Setting the background color for a row that's already been inserted into TableView widget
Started by alvin480 Aug 14 2018 09:35 AM

1 reply to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

alvin480

[GLOBAL: userInfoPane.html]
alvin480
  • Observer

  • 19 posts
  • Corona SDK

I used row:setRowColor() and it works perfectly for most situations. But for some reason it doesn't work when I try using in event phases "tap" and "release". So I'm trying alternatives.

 

I saw someone use event.background:setFillColor(), but it was an old post and I'm getting event.background = nil... so I guess it's no longer viable.

 

Any other way I can achieve row changing colour?

 



[TOPIC: post.html]
#2

alvin480

[GLOBAL: userInfoPane.html]
alvin480
  • Observer

  • 19 posts
  • Corona SDK

I just tried row._rowColor = {default = color, over = color}, but just like with row:setRowColor() it failed when I tried using it for  tableView widget's "tap" and "release" phase for touchEvent...

 

I guess my real problem is: why doesn't the coloring function work in those 2 phases?! For "press" it works perfectly




[topic_controls]
[/topic_controls]