# Changing button's background loses button's visual effect

**URL:** <https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058>\
**Category:** Ignition\
**Tags:** vision, ignition80\
**Created:** [March 13, 2020, 8:54am UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058 "2020-03-13T08:54:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [March 13, 2020, 8:54am UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/1 "2020-03-13T08:54:43Z")

</div>

I'm trying this in v8.0.9 and is still the same...  
When you change the button's background to anything else than default color (250,250,251), the button loses the visual effect of the button and doesn't look like the button anymore.

 ![ButtonBackground](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e097eb404c495254b5c5de1b5269fd5d2ab239ef.gif)  
For something basic like the button, I think this is going for too long. Why?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 13, 2020, 4:42pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/2 "2020-03-13T16:42:41Z")

</div>

Give the background color some transparency/alpha.

Due to the way the new look and feel works, buttons with vibrant background colors were appearing ‘muted’ upon upgrade, which led to complaints on the forum. So we (essentially) hardcoded thing so that a button set to a different background color _with no alpha_ will render with just that color. As soon as you give the background color some alpha, we’ll go back to using the new look-and-feel’s rendering code, which does preserve the mouseover effects.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [March 14, 2020, 5:45am UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/3 "2020-03-14T05:45:29Z")

</div>

OK then. I tried this in v8.0.9:

 ![backgroundButton2](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/7b8b811ac043f4e9aaa79c6961940ecc89655763.gif)  
It really doesn’t work until you give around 50% alpha.  
And then the background color is not the color you choose but something… ‘muted’…  
There are many situations where you need different background colors on the buttons and this is not a viable solution.  
Are you (IA) plan to do something about it or are we stuck with this?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 18, 2020, 3:48pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/4 "2020-03-18T15:48:50Z")

</div>

We (not me 🙂 ) are looking into whether this can be improved; we’ll check back with this thread once a decision has been made.

---

<div class="post-metadata">

**Author:** ![r.popeszku](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@r.popeszku](https://forum.inductiveautomation.com/u/r.popeszku)\
**Post date:** [March 24, 2020, 3:06pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/5 "2020-03-24T15:06:14Z")

</div>

I discovered the same issue after migrating from 7.9.13. This is a bug in my opinion that needs to be fixed. PGriffith, you mentioned that development was looking into this. Any idea on when there will be a solution?

---

<div class="post-metadata">

**Author:** ![r.popeszku](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@r.popeszku](https://forum.inductiveautomation.com/u/r.popeszku)\
**Post date:** [March 25, 2020, 1:21pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/6 "2020-03-25T13:21:43Z")

</div>

Has there been any progress on the 3D button issue on 8.0.x? I just migrated from 7.9.13 to 8.0.9 and the bug still exists. There is no 3d border and no color change on hover. This needs to be fixed.

A temporary solution would be for someone to add a 3D button to the symbol factory that works properly. There are two buttons in the items list but they don’t work the same. Anyway, who maintains the symbol factory items? I haven’t seen anything new in there since I started using ignition.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 25, 2020, 2:34pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/7 "2020-03-25T14:34:28Z")

</div>

> [@r.popeszku](#):
>
> Any idea on when there will be a solution?

No, no timeline.

> [@r.popeszku](#):
>
> Anyway, who maintains the symbol factory items?

Not us 🙂 [Symbol Factory](https://www.softwaretoolbox.com/store/item_pages/itempage_419.asp) is an off-the-shelf product that we essentially just drop directly into Ignition to make available. There are some new things coming to Perspective re: symbology "soon", but they probably won't come directly to Vision.

---

<div class="post-metadata">

**Author:** ![r.popeszku](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@r.popeszku](https://forum.inductiveautomation.com/u/r.popeszku)\
**Post date:** [March 25, 2020, 8:27pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/8 "2020-03-25T20:27:37Z")

</div>

“No. no timeline” isn’t a very good answer. Are the developers working on it?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 25, 2020, 8:38pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/9 "2020-03-25T20:38:13Z")

</div>

> [@r.popeszku](#):
>
> “No. no timeline” isn’t a very good answer

You upgraded from a long-term-supported version to a not-long-term-supported version. A version with huge architectural changes, and other big changes due to upstream Java clashing with the legacy Swing Look-n-Feel used in v7.9.x. Changes with consequences detailed ad nauseam on this forum. An upgrade you apparently did not _ **test** _.

Do you think this might not be entirely on IA?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 25, 2020, 9:10pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/10 "2020-03-25T21:10:23Z")

</div>

> [@r.popeszku](#):
>
> “No. no timeline” isn’t a very good answer. Are the developers working on it?

I understand your frustration, but I literally can't provide a more specific timeline than that. I can't even guarantee changes will be made at all. I can tell you it's been assigned to a particular developer for investigation. That doesn't mean they're actively working on it, or when they will. Hence, no timeline.

Also, I'd argue that an _honest_ response from a developer within a day _is_ a pretty good answer.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [March 25, 2020, 11:06pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/11 "2020-03-25T23:06:15Z")

</div>

You could also make your own button, template. It’s not hard to do and only takes a few minutes. Then you can make it just the way you want. You are the developer and you can yell at yourself.

---

<div class="post-metadata">

**Author:** ![r.popeszku](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@r.popeszku](https://forum.inductiveautomation.com/u/r.popeszku)\
**Post date:** [March 26, 2020, 4:53pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/12 "2020-03-26T16:53:50Z")

</div>

I could do that but why should I have to create a workaround to fix a development tool bug? Fix the root cause has always been my motto.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [May 29, 2020, 8:24am UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/13 "2020-05-29T08:24:51Z")

</div>

I tried it again in v8.0.13 RC1 and it’s exactly the same like in v8.0.9… 🙄

---

<div class="post-metadata">

**Author:** ![r.popeszku](https://avatars.discourse-cdn.com/v4/letter/r/51bf81/32.png) [@r.popeszku](https://forum.inductiveautomation.com/u/r.popeszku)\
**Post date:** [June 9, 2020, 2:55pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/14 "2020-06-09T14:55:21Z")

</div>

This is a known issue which has been confirmed by IA support and according to them development is “supposedly” going to fix it. I have an open ticket with support regarding this issue to remind them. I think more people should complain about this so maybe it will get fixed 🙄

Like zxcslo said earlier in this thread the workaround PGriffith suggested doesn’t work either. I tried that too.  
However I came up with a better workaround. Try this… (Note: this example is using my button named OverView which has a blue background)  
Add a background color change script to the mousePressed and mouseReleased events for the button. For the Pressed choose a darker or lighter color. For the Released put the color back to the original background color. This is the script

event.source.parent.getComponent(‘OverView’).buttonBG = system.gui.color(0,0,128)

Screenshot of the events you need to add.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/3d82bc4fbe2f0b9a06f4788ef9a2e810e4a7aae6.png)

The cool thing about my workaround is that you can pick a completely different color when you press the button which really pops!

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [July 12, 2020, 6:59am UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/15 "2020-07-12T06:59:42Z")

</div>

> [@zxcslo](#):
>
> I tried it again in v8.0.13 RC1 and it’s exactly the same like in v8.0.9… 🙄

Same in v8.0.15 RC1...  
It seems that the Button component is not so important ... users rarely use it and change the background of the button even less often ...

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [July 25, 2020, 8:40am UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/16 "2020-07-25T08:40:25Z")

</div>

Yes, but as you said earlier...

> [@](#):
>
> I could do that but why should I have to create a workaround to fix a development tool bug? Fix the root cause has always been my motto.

I really don't understand, why this 'issue' is not resolved yet...  
Button is THE essential component in every GUI...

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [August 27, 2020, 4:39pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/17 "2020-08-27T16:39:52Z")

</div>

Tried today in new 8.0.16 and still the same… 😕 🙄 😡  
Changing the buttons’ background loses the buttons’ visual effect.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [August 27, 2020, 8:28pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/18 "2020-08-27T20:28:48Z")

</div>

FYI, each version has release notes that you can browse through to see what is included. No need to install a new version just to see if they fixed a bug.

[https://inductiveautomation.com/downloads/ignition/8.0.16](https://inductiveautomation.com/downloads/ignition/8.0.16)

But, I feel your frustration… I’ve been waiting since January on what I felt were simple fixes.

For this specific case, you could try making your own buttons. On mousePressed:

```auto
if event.source.componentEnabled:
	color = event.source.buttonBG
	r = color.getRed()
	g = color.getGreen()
	b = color.getBlue()
	event.source.buttonBG = system.gui.color(r,g,b,120)

```

on mouseReleased:

```auto
color = event.source.buttonBG
r = color.getRed()
g = color.getGreen()
b = color.getBlue()
event.source.buttonBG = system.gui.color(r,g,b,255)

```

You could also do a border instead of color. On mousePressed:

```auto
if event.source.componentEnabled:
	import sys
	sys.add_package('com.inductiveautomation.ignition.common')

	from javax.swing.border import Border
	from com.inductiveautomation.ignition.common import TypeUtilities

	myBorder = TypeUtilities.coerce('bevel;1', Border)
	event.source.innerBorder = myBorder

```

on mouseReleased:

```auto
event.source.innerBorder = None

```

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [August 28, 2020, 3:44pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/19 "2020-08-28T15:44:54Z")

</div>

Yes, I know all that, but like @r.popeszku said:

> [@r.popeszku](#):
>
> I could do that but why should I have to create a workaround to fix a development tool bug? Fix the root cause has always been my motto.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [August 28, 2020, 3:56pm UTC](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058/20 "2020-08-28T15:56:59Z")

</div>

And he ended up doing something similar. You really have two choices, wait, or do a workaround on your own.

[Next page](https://forum.inductiveautomation.com/t/changing-buttons-background-loses-buttons-visual-effect/33058.md?page=2)
