.style not working on progress bar

Hi team,

Just a heads up that the .style doesn’t seem to be working on the progress bars.

export function testButton_click(event) {
    $w('#testButton').style.backgroundColor = "rgba(255,0,0,0.5)";
    $w("#progressBar1").style.backgroundColor = "rgba(255,0,0,0.5)";
}

Button changes but not the bar…

.style works. But before you can control the background by code, you have to do the following on the editor:

  1. Click the progress bar

  2. Click Design

  3. Customize Design

  4. Fill color & opacity

  5. Scroll bar background to 100%

Yes, good catch. On any and all elements with style, you have to set the opacity to 100 if you intend on changing opacity through rgba values.

It’s probably that changing the opacity in the gui editor affects some parent, while the Corvid way only affects the child.

Thanks guys. I was hoping to change the colour of the bar itself (not behind the bar) but doesn’t look like this is possible?

So use: style.foregroundColor

I totally missed that you could change this… idiot.

Thanks again