Questions tagged [mouseevent]

A general tag for user-interface events that are generated by the mouse. This includes pressing/releasing a button, clicking (including double/triple-clicks), moving, dragging, etc.

This tag deals with the events that are generated by preforming actions with a Computer Mouse and similar input devices which emulate the behaviour of a mouse (such as Touchpads and Graphic Tablets).

Mouse events are usually split into several categories:

  • Button Press (Button Down) event - The event where a previously unpressed mouse button just became pressed
  • Button Release (Button Release) event - The event where a previously pressed mouse button just became unpressed
  • Button Click event - A Button Press event followed by a Button Release event. In some platforms and locations, this concept has one or more of the following limitations:
    • The Press and Release both happend while the mouse was in the same place (the mouse wasn't moved between the press and the release). Sometimes there is a lighter version of this restriction, which only forces the mouse to be above the same "user interface element" on the press and release events.
    • The Press and Release both happend inside a limited (usually short) time interval.
  • Button Double (Triple/...) Click event - Two (Three/...) click events, one after another with the same mouse button. These may also have one or more of the limitations mentioned for a single click event
  • Button Move (Motion) event - An event where the mouse is moved. Usually this refers only to the case where none of the mouse buttons was pressed (for the case where one or more buttons was in fact pressed, see the next definition).
  • Button Drag event - An event where the mouse moves while one or more of the mouse buttons is held down
  • Button (Scroll) Wheel event - In modern mice, there is usually a wheel part called scroll-wheel, which can be moved (aka rolled, scrolled) up and down. Such a movement of that part is referred to as a Mouse Wheel event.
    • In some newer alternative input devices which also serve as a mouse, sometimes there won't be any physical whell. Instead, there may be hot-spot areas and/or buttons that will emulate the movement of the wheel. For example, in many touchpads, a movement in certain areas will be interpreted as scroll event.
    • Some mice (and other devices) allow scrolling not just up and down, but also in other directions (typically, left and right).

For more information and definitions, see the Computer Mouse and it's operation on Wikipedia.

6218 questions
2
votes
1 answer

In Qt tell the main class that an item was clicked

Situation: I have a Dialog class in QT on which I draw a raster of squares. The squares are implemented in the MySquare class (MySquare: QGraphicsItem). Inside the MySquare there are a number of functions (mysquare.h protected: ) void…
Thomas
  • 1,678
  • 4
  • 24
  • 47
2
votes
2 answers

resend event to page

I am working on a big project and it is required to resend event to page. Let me explain : A box
is over an image like this :
Once user clicks on the box, it moves to another location,…
John
  • 7,500
  • 16
  • 62
  • 95
2
votes
1 answer

jquery mobile 'tap' is working but ' doubletap' is not working

I am using ipad to check the function , the problem is doubletap does not work. And I have disable doubletap zoom and touchmove already, How to fix the problem ? thanks $('#page').bind('tap', function(){ alert('test'); });…
user782104
  • 13,233
  • 55
  • 172
  • 312
2
votes
1 answer

Is there a workaround for something like "Form1.MousePreview:=true"?

I have two 100% overlapping panels with different contents on a form. The first (static display of information) should be visible by default, but the other (user interaction) should replace it if the user moves the mouse near the two - and if the…
Imanuel
  • 3,596
  • 4
  • 24
  • 46
2
votes
0 answers

Double Click on tab header should open the tab content in new window.. Using MVVM

I am using MVVM. I have TabItems with headers mytabItem, mytabItem2. How to bind a function so that I can open a new Window on double click on Header of tab.
2
votes
1 answer

KendoUI Slider: can I generate a SLIDE or CHANGE event without mouse interaction?

I am working on an hexagonal pattern generator that uses KendoUI widgets as GUI. I am trying to implement a Randomize() function that would animate the slider handles to a random position. The function is called when clicking the Randomize!…
HappyTorso
  • 327
  • 1
  • 5
  • 14
2
votes
2 answers

Mouse Automation with c#

Can we use Microsoft.VisualStudio.TestTools.UITesting.Mouse for automation purpose in a program (Is it possible to use it with our normal application cording. Not for the testing. ) I want to automate some mouse movements in my program. Like we are…
New Developer
  • 3,245
  • 10
  • 41
  • 78
2
votes
1 answer

canvas cross domain pixel error

I'm having this issue with the html5 canvas. I'm using EaselJS to load in images. http://www.createjs.com/Docs/EaselJS/Bitmap.html But when I add any kind of mouse events (onClick, onMouseOver, onMouseOut) on a parentcontainer of the image, from…
Ruben
  • 441
  • 5
  • 14
2
votes
1 answer

Using MouseListener with JTree

I am using a MouseListener to detect double clicks on JTree items. That JTree is located in a JScrollPane. When I detect a double click (a MouseEvent), I get the path for the click location from the JTree. Most of the time, this works fine. Now if I…
Robin Krahl
  • 5,268
  • 19
  • 32
2
votes
1 answer

Register mouse events in 2 divs at the same time?

Is there any way to have a mouse event (click, hover, scroll, etc.) register on two different divs? I'm currently playing around with an app that uses both a leaflet map (similar to Google maps for those of you that don't know it) with a canvas…
thisissami
  • 15,445
  • 16
  • 47
  • 74
2
votes
1 answer

How to animate an image in WPF with a mousedown event on the canvas or window

I have a window with a canvas using WPF and C#. On the canvas I have an image. I want to apply a mousedown event to the window or canvas that will animate the image left or right depending upon which mouse button is clicked. Left mouse button should…
ClamsCasino
  • 49
  • 2
  • 8
2
votes
1 answer

Responding to MS Wireless Notebook Presenter Mouse 8000 presenter buttons in WPF/WinForms

Does anyone know how to respond to the presentation buttons of the Microsoft Wireless Notebook Presenter Mouse 8000 in WPF or WinForms?
Richard Hopton
  • 201
  • 1
  • 5
2
votes
1 answer

Re-dispatch MouseEvent via JScrollPane abnormal behaviour

I have modified a little code from here: https://stackoverflow.com/a/13357269/1360074 Since there is known bug with JScrollPane not passing MouseEvent up I did a workaround with FakeMouseListener. import java.awt.BorderLayout; import…
Nikolay Kuznetsov
  • 9,467
  • 12
  • 55
  • 101
2
votes
0 answers

Draw using mouse drag event in JOGL.

Well Guess I could need some help here. I'm new to JOGL, and I am trying to draw on the 3d canvas perhaps just anything, but the point is to use mouse drag events. Any idea how am I be able to do that? I try something as below but it did not worked…
Ken
2
votes
2 answers

coordinates mouse canvas

So ... I created canvas element with jquery: var canvasElement = $("
Arti
  • 7,356
  • 12
  • 57
  • 122