Can I do Variable (x) =

Hi,
I am looking to for a way to change several variables at once.
Something like this -

Button1 - change color to blue
Button2 - change color to blue
B3...

Code like -
x = x + 1
Button(x) - color is Blue
(loop)

But I don't think there is any way to do Button(x), that is Variable(x)?

Perhaps with javascript? (Sorry, I don't know it at all).
@marco_tanzi suggested it for another issue I had.

  • Mirth

Put your buttons in a list, then iterate over that list and use the anyComponent block for button color.

1 Like

I do that in

1 Like

2 Likes

Thank you for your answers!
Thank you @TIMAi2. I have been learning AnyButton, but didn't see that option. It's first on the description page! I need to disicpline myself to do more learning, even with limited time.
@ABG - Great. I'm going through your tutorial/example. Excellent. Thank you.
@marco_tanzi - thank you for your reponse. That's another good way to do it.
I'm working on it now.

My test app works great. Thanks again!

AnyButton

1 Like