Making Spin Buttons

Yet another Axure puzzzle…:face_with_raised_eyebrow:
I would like to make spin buttons… I.e., a text input with up/down arrows on the side. Ala Excel and VB.
The behavior is while the mouse button is down on the down arrow the numeric data decreases repeatedly. On the mouseup it stops. Vice versa with the up arrow.
I kinda got it to work using the Mouse button down event, set the text, wait, then Fire this event again… BUT… it does not stop on the Mouse Button Up event.
Is there a more proper way to do it? Am I missing something yet again? The sample “Stepper” in the Sample UI Patterns library is not providing the repeating behavior.

You need a condition to break the loop, or it will continue indefinitely. Use a global variable with a default value of false. On the OnMouseDown event, set the variable to true.

Add a condition to the looping case that says the global variable must be equal to true.

Finally, to break the loop, use the OnMouseUp event to set the variable back to false so the next time it loops, the condition is false, and the loop ends.

Tried that.
When it Fires the Mouse Down event it sets the variable to True thereby not meeting the Case for the Mouse Down event so it can’t loop when the Mouse down event is fired…
Now… maybe if we had an event that was not coupled to something which was only called using “Fire Event”…

You could just repurpose any event for that. OnMove is a good one if you never plan on moving it.

I’ll play around with it tomorrow, I know I’ve done before years ago.

Good idea. It worked.
For others walking the same path:
A Mouse Button Down event sets the condition (I used an invisible label as a local variable) to true, then it fires a Moved event.
The Moved event uses the condition for the case, then decrements or increments the number in the data field. It waits tiny bit then fires itself.
A Mouse Button up event changes the condition to false which stops the Move event.
Thanks!