Page 1 of 1

Change tag value by holding down button

Posted: Thu Jul 26, 2012 7:58 am
by motley
Is it possible to have a tag chnage it's value continuously as long as a button is help down ?

Thanks,

Chris

Re: Change tag value by holding down button

Posted: Thu Jul 26, 2012 8:49 am
by mark.monroe
I think you are asking for a momentary button. Take a look at this forum topic on monetary buttons.

Re: Change tag value by holding down button

Posted: Fri Jul 27, 2012 2:50 am
by motley
Mark,

Not really, more the other way round.

What I want to achieve is a continuous change to a tag value as long as a button is held down.

I have been asked to provide 'simulations' for values in this manner so I have two buttons marked 'UP' and 'DOWN' (how very original) and I would like to relevant tag to increment in either direction as long as the button is held down.

I know I could use a slider or direct entry - but as I say that's not what's been asked for...

Thanks,

Chris

Re: Change tag value by holding down button

Posted: Fri Jul 27, 2012 6:55 am
by mark.monroe
Hi Chris,

You will need to create a timer and a momentary button. The momentary button will start and stop the timer. On mouse down, start the timer and on mouse up, stop the timer. By setting the timer.Interval property you will set how quickly the tag value changes.

Re: Change tag value by holding down button

Posted: Sat Jul 28, 2012 1:22 pm
by motley
Mark,

Thanks for that - will give it a try...

Chris