Click on widget a second time to perform opposite action?

This is probably really simple and it’s right in front of me…but for the LIFE OF ME, I can’t figure it out…:fearful:

I’m creating a drop down menu. I want to be able to simply click ONCE…menu slides down (that I know how to do)

Then click AGAIN and the menu slides back up to disappear. Is there a way to make the same click perform TWO different actions (one to show/reveal and one to hide).

What is the secret to this?

First the widget you click to open set that to Show and after the content is displayed set the arrow to hide and then set the up arrow to Show.

Widget 1
Show
Send to back
Show Widget 2

Then reserve it

Hi, @gianfranco1990.

You can achieve this by toggling the visibility of the dropdown options and setting an animation (slide down/up). You can check the setup here: Toggle_Visibility.rp (48.9 KB).

2 Likes

@designerd shows a good method that is easy to do for toggling a state/action like visibility. if you want to do more actions, or something else that does not have a built-in “toggle” option, then the general way to do this is to turn your button (“Select Type”) into a toggle button, where its selected state gets toggled on and off.

Your OnClick event just needs to “set selected of This to toggle.” Then, put your code in the OnSelected event (you can cut & paste your current events from OnClick) --find this event in the “More Events” list in the Properties panel. Set up the “opposite” events for the OnUnselected event.