Message Boards Message Boards

Back

How to toggle buttons in a group

How to toggle buttons in a group
Answer
1/23/19 11:45 AM
I have 5 buttons which when clicked will each show a layer. How do I change the color of the last button clicked to remain dark, and then switch it back to the normal color when another button is clicked?
0 (0 Votes)

RE: How to toggle buttons in a group
Answer
1/23/19 8:50 PM as a reply to Kirsten Burnett.
Hi Kirsten,
There are 2 ways to do this - the simple way, or the elegant way.  With 5 buttons, either choice is valid.  If you had 10 or 30 buttons, I would recommend the elegant method - it uses some more advanced concepts (tag lists and for loops), but allows for one action to handle any number of objects.  Here's a video for both methods, and you can decide which makes the most sense for your needs:

Simple way - http://share.smartbuilder.com/public/support/button_group_simple.mp4

Elegant way (using tag lists and for loops) - http://share.smartbuilder.com/public/support/button_group_tag_list.mp4

Hope that helps!
0 (0 Votes)