viSci Posted February 27, 2009 Report Share Posted February 27, 2009 I have an Touchscreen HMI that will popup a keypad when a numeric control is double clicked. The problem is that I also want to allow a user to single click the inc/dec arrows with the mouse if it is present. If the single clicks are fast enough they register as an unwanted double click event. I have a single registered mouse down and value changed event for all of the control references in my HMI so I need a generic solution to differentiate between a value change event and a double click. So far I have not been successful. Is it possible within the value change event to disable the double click event or throw away a mouse click? Quote Link to comment
LAVA 1.0 Content Posted February 28, 2009 Report Share Posted February 28, 2009 QUOTE (sachsm @ Feb 26 2009, 10:23 PM) I have a single registered mouse down and value changed event for all of the control references in my HMI so I need a generic solution to differentiate between a value change event and a double click. So far I have not been successful. Is it possible within the value change event to disable the double click event or throw away a mouse click? You could look for the 'Mouse Down?' event, one of the left hand terminals has the value 'Double Click', if this is true, discard the event. This might (might) the actual Double click (I seriously don't know), otherwise I think the same terminal is available in the 'Mouse Down' event. Ton Quote Link to comment
viSci Posted February 28, 2009 Author Report Share Posted February 28, 2009 Here is my solution so far... I have to perform the double click detection myself and interfere with the description property. Quote Link to comment
LAVA 1.0 Content Posted March 1, 2009 Report Share Posted March 1, 2009 Àny reason not to use the native Double Click detection: Ton Quote Link to comment
viSci Posted March 2, 2009 Author Report Share Posted March 2, 2009 Hi Ton, Perhaps I am not understanding how simple the solution is but I cannot see how to use the native double click to produce the desired result. Take a closer look at my example and notice that it is able to differentiate, on a single numeric control, between a double click and two fast successive value changes. Quote Link to comment
LAVA 1.0 Content Posted March 2, 2009 Report Share Posted March 2, 2009 Hi, I used auto-clean up to trim down the size of the screenshot, unfortunatly the title of the event was truncated. The screenshot I showed was for the 'Mouse Down' event. This event has a mod.doubleclick terminal to indicate whether the mouse down was part of a double click. All provided by the OS, I am not sure if the HMI module has this possibility. Ton Quote Link to comment
viSci Posted March 2, 2009 Author Report Share Posted March 2, 2009 Ok, I will try again to explain...If I double click on the text field of the control I want a popup touchscreen keypad to appear. If I click twice rapidly on the up arrow of the control then I do not want to have the keypad popup, but unfortunately the Mods:Double Click property cannot tell the difference by itself. BTW, thanks for your interest in trying to help. Quote Link to comment
Michael Aivaliotis Posted March 3, 2009 Report Share Posted March 3, 2009 QUOTE (sachsm @ Mar 1 2009, 09:54 AM) Take a closer look at my example and notice that it is able to differentiate, on a single numeric control, between a double click and two fast successive value changes.If it works then what's the problem? Quote Link to comment
viSci Posted March 3, 2009 Author Report Share Posted March 3, 2009 Cool...I never knew you could get that kind of detailed coordinate information, thanks. I prefer your solution since it does not rely on having to use up the description property of the controls. Quote Link to comment
huotom Posted April 30, 2009 Report Share Posted April 30, 2009 QUOTE (Ton @ Feb 28 2009, 03:46 PM) Àny reason not to use the native Double Click detection: http://lavag.org/old_files/monthly_02_2009/post-2399-1235807145.png' target="_blank"> Ton I think this is the best and simple solution. Using "mouse down" event + case structure , we can handle single click and / or double click separately. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.