0

I added button and change it background-color by .setBackgroundColor() function. But on mousedown button changes background-color to blue.

Default state:

Default state

After mousedown:

After mousedown
How I can prevent change background-color of button?

Rafa Guillermo
  • 14,474
  • 3
  • 18
  • 54

1 Answers1

0

You can't, there's no function that allows you to change or disable the default behavior on mousedown event for a TextButton object. I have tried setting the button with setOpenLink and setOnClickOpenLinkAction but the behavior is the same changing to the same blue color on mousedown event regardless of the color you set to the button with setBackgroundColor method.

Andres Duarte
  • 3,166
  • 1
  • 7
  • 14