2019-05-20 01:45 AM
Hello,
Is there a way to change the color of a botton directly from the code?
Thanks.
Solved! Go to Solution.
2019-05-20 02:00 AM
Hi @GMeur,
There are multiple types of buttons. If you're using a standard Button it requires an image for both released and pressed states so you would have to have assets in the color of your choice.
If you're using a flex button, you might be using a "Box with Border" - And here you can change the color of the box (and thus button) directly.
/Martin
2019-05-20 02:00 AM
Hi @GMeur,
There are multiple types of buttons. If you're using a standard Button it requires an image for both released and pressed states so you would have to have assets in the color of your choice.
If you're using a flex button, you might be using a "Box with Border" - And here you can change the color of the box (and thus button) directly.
/Martin
2019-05-20 02:28 AM
Thanks for your quick reply.
Therefore, if I want to design a keyboard whose color of the keys can be changed easily from the code, I must use flex buttons for them and implement the 'clicklistener' function, right? Can you think of any easier ways of doing it?
2019-05-20 02:53 AM
That's one way of doing it yeah.