Skip to main content
Adirai Maji
Inspiring
February 2, 2020
Answered

How to Change back to normal color after clicking of IconButton using script?

  • February 2, 2020
  • 1 reply
  • 491 views

I make a script using iconbutton when I make onClick function on that iconbutton the button turns into blue color. (It's being highlighted after clicking on it). How can I turn it back into normal state after every single click??

This topic has been closed for replies.
Correct answer Tomas Sinkunas

You have to specifically set it to be active, and then innactive. 

That's stupid, but that's how this works:

 

iconbotton.onClick = function(){
	this.active = true;
	this.active = false;
};

 

1 reply

Tomas Sinkunas
Tomas SinkunasCorrect answer
Legend
February 2, 2020

You have to specifically set it to be active, and then innactive. 

That's stupid, but that's how this works:

 

iconbotton.onClick = function(){
	this.active = true;
	this.active = false;
};

 

Adirai Maji
Inspiring
February 2, 2020

Great it works..!