Binding gradient fill paint

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

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

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

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

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


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.

1 Like

Great! Thank you!

1 Like

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})