toggle container on/off with same button

Put your questions here on how to do things in ProtoShare.
Posts: 1
Joined: Sun Mar 30, 2014 5:57 pm

toggle container on/off with same button

Postby Lori » Sun Mar 30, 2014 6:25 pm

Hello -- I am trying to toggle a container on/off with a single "button" that I created. The button is also a container housing an icon + a circle shape.

I followed your video tutorial on how to "show" a container and that's working, but I haven't found instructions for hiding it using the same button. Your User Guide shows the concept diagramed on the "Planning State Interactions" page, and refers to the concept of multiple states. Is that the solution? If so, how is that done?


Nick Jennings
Posts: 165
Joined: Mon May 14, 2012 12:06 pm

Re: toggle container on/off with same button

Postby Nick Jennings » Tue Apr 01, 2014 10:08 am


You are correct that the Planning State Interaction page does have the solution, but you should not need to use multiple states to set this up. Since you have the container showing when the button is clicked, you are on the right path.

To have the container be hidden, you will need some type of trigger that changes the state value back to the default value or another value that does not make the container visible. While you can't create this with a single button, you can simulate it by using two buttons that look exactly the same and place them at the same position.

One that is visible when the container is off and has an On Click changing the state value so that the container becomes visible and hides the button itself. The second button needs to become visible only when the container is active, so using the same state value, and have an On Click set to turn the state value to the default state or another OFF state.

This will make it so that you can toggle the container with the same "button". It can be a little complex depending on your exact design so if you have any questions, just let us know.
Nick Jennings
Site9, Inc. / Customer Support |

Return to “How Do I...”

Who is online

Users browsing this forum: No registered users and 5 guests