# Binding gradient fill paint

**URL:** <https://forum.inductiveautomation.com/t/binding-gradient-fill-paint/4648>\
**Category:** Ignition\
**Created:** [June 15, 2012, 4:19pm UTC](https://forum.inductiveautomation.com/t/binding-gradient-fill-paint/4648 "2012-06-15T16:19:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![idelamer](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@idelamer](https://forum.inductiveautomation.com/u/idelamer)\
**Post date:** [June 15, 2012, 4:19pm UTC](https://forum.inductiveautomation.com/t/binding-gradient-fill-paint/4648/1 "2012-06-15T16:19:16Z")

</div>

Is there any way to bind a gradient fill paint? or to set a components fill to gradient through scripting?

tried a few things and read the user manual but couldn’t get it to work.

Cheers  
Ivan

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [June 15, 2012, 4:54pm UTC](https://forum.inductiveautomation.com/t/binding-gradient-fill-paint/4648/2 "2012-06-15T16:54:27Z")

</div>

Not right now. We are working on creating new expressions to make gradient fills.

---

<div class="post-metadata">

**Author:** ![idelamer](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@idelamer](https://forum.inductiveautomation.com/u/idelamer)\
**Post date:** [June 15, 2012, 5:12pm UTC](https://forum.inductiveautomation.com/t/binding-gradient-fill-paint/4648/3 "2012-06-15T17:12:18Z")

</div>

Thanks Travis. It would be useful to have this to work with styles. For now I’ll have 2-3 rectangles with their own gradients, and change the Visible property with styles. Would be better to have 1 component though…

Cheers  
Ivan

---

<div class="post-metadata">

**Author:** ![Toobor](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@Toobor](https://forum.inductiveautomation.com/u/Toobor)\
**Post date:** [February 11, 2020, 3:38pm UTC](https://forum.inductiveautomation.com/t/binding-gradient-fill-paint/4648/4 "2020-02-11T15:38:52Z")

</div>

Hi, I ran into this problem too. Have you been able to solve this problem?

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 11, 2020, 6:09pm UTC](https://forum.inductiveautomation.com/t/binding-gradient-fill-paint/4648/5 "2020-02-11T18:09:36Z")

</div>

This is possible–though awkward–with the style customizer:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e88a57d4318a297a5049e443579db1947fabe65e.png)  
The trick is you can’t set these fills in the style customizer, but it will show the fill you already have when you open the style customizer. Set the fill you want directly on the object, open the style customizer, and it will be there. Repeat and adjust the values for each style until you have all the gradient fill styles you need.

---

<div class="post-metadata">

**Author:** ![Toobor](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@Toobor](https://forum.inductiveautomation.com/u/Toobor)\
**Post date:** [February 12, 2020, 6:57am UTC](https://forum.inductiveautomation.com/t/binding-gradient-fill-paint/4648/6 "2020-02-12T06:57:44Z")

</div>

Great! Thank you!

---

<div class="post-metadata">

**Author:** ![bebel](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bebel](https://forum.inductiveautomation.com/u/bebel)\
**Post date:** [May 18, 2020, 9:09pm UTC](https://forum.inductiveautomation.com/t/binding-gradient-fill-paint/4648/7 "2020-05-18T21:09:56Z")

</div>

I was working on this and found an easier solution. I have several water pumps and wanted to change the pump bodies blue when running. At first I created two components and toggled visibility but there is scripting attached which I did not want to duplicate. The easy solution was to create two ‘extra’ pumps, one called Gray Body Pump and one called Blue Body Pump. For the Blue body I modified the gradient to make it blueish. I then set visibility of both pumps to false so they could not be seen. Then on each water pump on the window I used an expression to bind the ellipse fill color to one or the other depending on the running status of that pump. I only need one pump of each color on the window and I could copy and paste this expression into each binding, only needing to edit the pump number in the tag name.  
if({[default]…/M1\_RUNNING},  
{Root Container.Blue Body Pump.Group\_PumpBody.Ellipse.fillPaint},  
{Root Container.Gray Body Pump.Group\_PumpBody.Ellipse.fillPaint})
