mouseevent

How to acquire an event only at defined times?

I have a QWidget which handles the mouseevent, i.e. it stores the mouseposition in a list when the left mouse button is pressed. The problem is, I cannot tell the widget to take only one point every x ms. What would be the usual way to get these samples? Edit: since the mouseevent is not called very often, is it possible to increase th...

Mouse event is not detected on my NStableview + cocoa

Hi Guys I have been trying this for past few days but couldnt figure it out. I have an application which has a NSOutlineView and a NSTableView. Outlineview takes input a path and displays them in the form of a tree structure its sub contents. So when ever a user clicks on a particular folder in the outine view, the contents of the fold...

Help with Mootools code

So I am using the mousenter demo from mootools. I put it on my site trying to affect the links so when someone hovers over them the link fades into another color. The problem I am having is that the mootools code is only set up to handle one ID! Since I am using it for a nav, I have multiple IDs that I want to change. How can I affect a...

How do I determine which monitor a Swing mouse event occurs in?

I have a Java MouseListener on a component to detect mouse presses. How can I tell which monitor the mouse press occurred in? @Override public void mousePressed(MouseEvent e) { // I want to make something happen on the monitor the user clicked in } The effect I'm trying to achieve is: when the user presses the mouse button in my app...

Unit testing functions relying on MouseEventArgs?

I am currently working on a project of mine which is a MSPaint-like WPF application. However I don't paint with pencil tools or something similar but with objects (Rectangle, Circle, Triangle etc.). I use Prism and the MVVM model to achieve testability and maintainability. I've now run into a problem. I have a CanvasView.xaml that's (as...

Unit testing functions that only change private member variables?

I am currently writing unit tests for a ViewModel in my project that uses Prism and the MVVM pattern. My view mainly consists of an ItemsControl that reacts to different mouse events (LeftMouseButtonDown, LeftMouseButtonUp etc.). When such a mouse event happens the EventArgs and some other glue info is handed to the ViewModel and an app...

Adding a child component to a JButton

Is it possible to place a child component inside a JButton and make it transparent to a subset of mouse events so that: The child component receives MouseMotionEvents (so it can respond by modifying a displayed image) Clicking still depresses the JButton "behind" the child component If you add the child component to the button but ma...

what is standard user mouse speed range, on which GUI web-developer can rely?

As you know, browsers generate events depending on mouse speed (sometimes failing to generate, if mouse speed is too high). Are there any research - on which speed should any application be optimized and on which - should not? ...

as3 MouseEvent localX acting weird

Hi, I encountered this really weird situation, I have this bar and I addEventListener to it, so when the bar's clicked, trace localX private function _barClicked($e:MouseEvent):void { trace($e.localX) } The weird thing is that, when clicking at the same spot, sometimes it jump to a wrong number which I can't figure out why, I t...

WPF Checkbox control don´t react to MouseLeftButtonDown event

I have the following XAML code: <Grid Background="Blue"> <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown"> <CheckBox MouseLeftButtonDown="CheckBox_MouseLeftButtonDown_1"></CheckBox> </Grid> </Grid> When i click the checkbox with the mouse left button, the declared event is not fired. Can anyone have an ...

draw using mouse drag event in JOGL.

Hi, 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 out. And also in the below codes, I do not understand why the display() method is b...

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? ...

Is it possible to capture mouse events for a Silverlight control via JavaScript?

Since it appears Silverlight does not support the middle mouse button click event, is there a way to capture this event in JavaScript when the user middle button clicks on the Silverlight control? That way, I could pass the event on via a javascript to silverlight bridge. ...

Resize a movieclip wihout messing up mouse coordinates.

How do I do this? I have a seekbar which I'm retrofitting to resize with the FLVPlayback. Right now it gets the mouseX when you click the seekbar, and divides that by the length of the seekbar in order to know what percentage it should seek to. My problem is that now that I'm dynamically setting the width of the seek movieclip the width...

java: activating a mouse click event

I have a java method activated by a mouse click on a button private void backButtonMouseClicked(java.awt.event.MouseEvent evt) { do stuff } is there some way to virtually use this method from another method without clicking the mouse on the button? ...

MouseListener on JFrame

I want to be notified of mouse events (specifically the mouse entered and exited events) on my JFrame. But when i add a mouselistener to it i get the events on the borders of the frame not the entire frame with it's contents. Any ideas as to why? EDIT : Or at least do you have an alternative? I want a "gloabal" way to catch mouse even...

How can I reliably track mouse enter and leave events?

Various experiments I've carried out indicate that there is no foolproof way of responding to a 'mouseleave' event using jQuery. Two actions appear to not trigger any relevant event: Moving the pointer away from an element very quickly Moving the pointer off the element via some browser chrome (or out the the window entirely) The sec...

Problem with EventTrigger for MouseUp, it triggers only on right-button

Please take a look at the following snippet: <EventTrigger RoutedEvent="Image.MouseUp"> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName="TranslateTransform" Storyboard.TargetProperty="X" From="1" To="0" Duration="0:0:0.15" /> <DoubleAni...

How to send keyboard and mouse commands to the underlying operating system using Ruby?

Is there an operating system neutral way for Ruby to send keyboard and mouse events to the underlying operating system? One obvious (to me) approach is to use the Ruby/Java bindings and use java.awt.Robot, but that just seems silly. ...

drag & drop and mouse design patterns?

Are there any well-studied design patterns related to drag & drop and mouse gestures? Consider a canvas containing objects in a parent-child hierarchy with a certain layout. Some objects can be dragged and dropped onto other objects using the mouse. In addition, objects can be resized and moved with the mouse. Different hot-spots on obj...