Button State Change [+] to [-] Show/Hide List


#1

Hello,

I created a [+] icon and label called Employee Support. Next, I grouped both and created a dynamic panel. I have a list of topics that I grouped and turned into a dynamic panel. And, then I made the list hidden. The [+] button interaction is: Click or Tap, Show/Hide the List dynamic panel.

The part I can’t figure out is how to change the [+] icon to a [-] icon when the list is shown. And, when I click the [-] icon the list is hidden again and the [-] changes back to the [+] icon.

Any help with the logic/ conditions is appreciated.

Thanks


#2

Here is a quick demo
Button State Change.rp (57.8 KB)

i created a dynamic panel for the icon, with two states: one for the plus, another for the minus. This is nested in the “icon and “Employee Support” label” dynamic panel. I added a Shown event and Hidden event to the list dynamic panel which controls the state of the icon dynamic panel.

By creating the interaction code logic in this manner, it not only directly meets your “requirements” : Change the icon when the list is shown or hidden, it also means that however and whenever the list is shown/hidden the icon will change. So, if you need to create another way to show/hide the list–other than clicking on the “Employee Support” panel, it will still work.


#3

AMAZING - THANK YOU!! This is exactly what i have been trying to do!!


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.