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

How to change iconbutton highlight color?

Explorer ,
May 13, 2020 May 13, 2020

Copy link to clipboard

Copied

Hi everyone

 

I have a iconbutton in my script right now. The icon image has alpha channel, as is shown below:

Aaron_Ecthelion_0-1589374680230.png

 

When I mouse over on it, the highlight color shows, which is not really looking good.

Aaron_Ecthelion_1-1589374756968.png

The thing is, I want to change this highlight color to a darker one, like KBar.

Aaron_Ecthelion_2-1589374861101.png

This looks really nice!

 

I have been looking for ways to do this. Messing up with graphics object, brush Object a lot, but didn't succeed. It seems that we cannot change the background color of a button with some function like this:

function setBackgroundColor(uiElement, color) {
        var g = uiElement.graphics;
        var brush = g.newBrush(g.BrushType.SOLID_COLOR, color, 1);
        g.backgroundColor = brush;
    }

When it comes to buttons, code above only gives you error saying that we cannot do this.

Aaron_Ecthelion_3-1589375435336.png

 

So, can we change it via ExtendScript? What can I do to this highlight color?

If not, how can I achieve such an effect using some other methods?

 

Aaron

TOPICS
Error or problem , How to , Scripting , User interface or workspaces

Views

385

Translate

Translate

Report

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
Explorer ,
Apr 04, 2023 Apr 04, 2023

Copy link to clipboard

Copied

LATEST

I hope they will answer you? because I myself have been waiting for an answer for a very long time)

Votes

Translate

Translate

Report

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