[SOLVED] How to set a button border color dynamically?

Good afternoon,

How would I set a vision button’s border dynamically? The following expression works fine.

toBorder("matte;'0, 255, 255';5;5;5;5")

However this does not work fine

toBorder("matte;{tagPath};5;5;5;5")

This also doesn’t work…

toBorder("matte;runScript('myScript.getColor()');5;5;5;5")

Thanks for any input.

you should be able to do it with something like this: toBorder("matte;" + {tagPath} + ";5;5;5;5")

1 Like

I followed your suggestion and also added a custom property called myColor with the following expression binding:

runScript('myScript.getColor()')

And then using your syntax:

toBorder("matte;" + {component.customPropertyPath} + ";5;5;5;5")

And it works!
Thanks!

1 Like