cancel
Showing results for 
Search instead for 
Did you mean: 

How to change color of selected tile in a tile container?

0 Kudos

Hey all!

I have a tile container with some tiles. Upon selecting a particular tile, I want to hightlight/change the color of the selected tile. How can I do this using controller?

Accepted Solutions (0)

Answers (1)

Answers (1)

jorge_cabanas
Participant
0 Kudos

Hi,


I assume you are using "Generic Tile" (If not, I'm sure you will can adapt it to your tile type)

1- Attach the event "Press" of the tile to a method of the controller.
2- In this method get the tile (oEvent.getSource())
3- Attach a CSS class to it in order to highlight it (For example with the property: "background-color: red")
4- Write your case logic to remove the highlight whenever you want to quit it

It's just a way, for sure there will be anothers. I hope it suits for you