Skip to Content

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

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 22, 2018 at 08:41 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.