04-18-2008 08:38 AM
04-18-2008 10:40 AM
04-18-2008 11:30 AM - edited 04-18-2008 11:31 AM
the double click is only in the listbox, I would assume. there's no pane doubleclick event, only control doubleclicks. so if the coordinates of the single click were in the list box, you could just ignore most of the event actions, I would think.
edit - this would have to be in the situation where he has a separate event structure for the doubleclick, otherwise the single clicks would still take precedence, I think.
04-18-2008 11:58 AM
04-18-2008 12:31 PM - edited 04-18-2008 12:31 PM
One thing I haven't seen mentioned in this thread is that the mouse down and mouse down? events have a Mods.Double Click property that can be read by way of the properties within the event structure. ???
Are there any problems with using that?
04-18-2008 01:08 PM - edited 04-18-2008 01:10 PM
Yepp,
@Ravens Fan wrote:
One thing I haven't seen mentioned in this thread is that the mouse down and mouse down? events have a Mods.Double Click property that can be read by way of the properties within the event structure. ???
Are there any problems with using that?
Message Edited by Ravens Fan on 04-18-2008 01:31 PM
04-21-2008 07:40 AM
12-15-2008 12:01 PM
I know this is a somewhat old thread, but I wanted to make the point that a better solution is to (when possible) conceptually define the single-click action as a subset of the diouble-click action. For example, single-clicking an item in a list selects it, while a double click selects and activates it. With this structure, the single click is fired - but it doesn't matter.
Mike...
05-26-2011 04:20 PM
I know this post is old but, since I had the same problem without finding a satisfactory solution on this forum, I implemented one by myself and I post it here for anyone who maybe will needs it in the future. ;)
05-27-2011 03:33 AM
@Helpdesk85 wrote:
I know this post is old but, since I had the same problem without finding a satisfactory solution on this forum, I implemented one by myself and I post it here for anyone who maybe will needs it in the future. ;)
Hi,
This example could work for you. There are some caveats that you might be aware of (I haven't looked at the other solutions, they might have the same caveats)...
There is a potential race condition. You set "Single" to true, but there is no guaranty it happens before setting it to false (in the OK Button mouse down event case). That is easy to fix by wiring the error out of the first property node. Leaving it like this, it might work fine, and then it stops working without any apparent reason.
It only works when the time out case actually triggers. If you add events, like a mouse move event, it doesn't work anymore when the mouse moves, since the time out event isn't triggered. The TO event is also not triggers when you continously click or double click the button. You can solve this by using two event structures (one in a sub vi, with only a TO, mouse down and stop event).
The 300 ms time out is arbitrairy. A user can set windows to use a double click interval of 2 seconds, or 50 ms. I think the only way to avoid this is to read the double click interval time with a windows API call...
So, if it works, use it. But still no satisfactory solution if you'd ask me.
Regards,
Wiebe.