Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Contributor ,
Feb 02, 2020 Feb 02, 2020

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??

TOPICS
Preview , Scripting , User interface or workspaces
477
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Feb 02, 2020 Feb 02, 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;
};

 

Translate
Advocate ,
Feb 02, 2020 Feb 02, 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;
};

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 02, 2020 Feb 02, 2020
LATEST

Great it works..!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines