Logic Machine Forum
short/long click on a button - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: short/long click on a button (/showthread.php?tid=93)



short/long click on a button - Peter - 05.10.2015

Hello,
I would like to know if there is a way how to distinguish between long and short click on a button. Would be very useful for many aplications, for example for blinds control, where it will save us half the space needed for icons.
Thanks


RE: short/long click on a button - admin - 05.10.2015

Right now it's only possible by creating custom SVG with JavaScript which will act as a button.


RE: short/long click on a button - AdriSaliai - 21.12.2015

Can you give a exaple please??


RE: short/long click on a button - admin - 22.12.2015

Attached is a minimal example of short/long press SVG. Short press sends "true" to 1/1/1, long press sends "true" to 1/1/2. Long press time is 1.5 seconds (1500ms). Add this image to Vis. graphics -> Images / Backgrounds. Add it to visualization as "Image" element, it will not work if used as an object icon.