WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Detect a double click on a gui slider (https://forum.worldviz.com/showthread.php?t=3066)

Renato Lima 11-07-2010 04:48 PM

Detect a double click on a gui slider
 
Is it possible to detect a double click on a slider?

Renato Lima 11-07-2010 06:10 PM

Please, benjamin. Enlighten me with your knowledge.

Jeff 11-08-2010 03:49 PM

A silder event is only generated when the slider changes position. If you doubleclick on the same spot no event will be generated for the second click so you can't tell it occurred.

Renato Lima 11-09-2010 02:19 PM

What if I try to check if mouse is over a slider after doubleclick?

Renato Lima 11-09-2010 02:23 PM

This is how I solved my problem:


def onDoubleClick(e):
if e.button == viz.MOUSEBUTTON_LEFT: print 'Left button double clicked'
print Gui["YRBox_Speed"].dragging()

viz.callback(viz.DOUBLE_CLICK_EVENT,onDoubleClick)
#viz.callback(viz.SLIDER_EVENT,onSlider)


All times are GMT -7. The time now is 04:31 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC