mousemove

div onmouseout does not work as expected

[亡魂溺海] 提交于 2019-12-13 04:19:47
问题 Text and sample code adapted from http://www.webdeveloper.com/forum/archive/index.php/t-65078.html, may not reflect actual question: I have a div and then a div with a nested table inside it: also there is some div outside the parent div. <div onmousemove="move()" onmouseout="out()"> <div id="dvRep"> </div> <table> <tr><td>ITEM 1</td></tr> <tr><td>ITEM 2</td></tr> <tr><td>ITEM 3</td></tr> <tr><td>ITEM 4</td></tr> <tr><td>ITEM 5</td></tr> </table> </div> <div id="divChartPopupMenu"> Hide me. <

mousemove and cross-browser e.which

扶醉桌前 提交于 2019-12-13 00:48:33
问题 I need to know which mouse key is pressed on every mousemove event, and I try to use this: getMouseCode: function(e) { e = e || window.event; if (!e.which && e.button) { if (e.button & 1) e.which = 1; else if (e.button & 4) e.which = 2; else if (e.button & 2) e.which = 3; }; return e.which; }, But this is works only in chrome and IE7-8. IE9 debugger always says e.button == 0 and e.which == 1. After some debugging I figured out that window.event for IE9 contains right value of which, so I

Prevent robot.mouseMove to generate a MouseEvent?

自闭症网瘾萝莉.ら 提交于 2019-12-12 19:33:37
问题 I have a 3D game, and every time I move the cursor, I want it to reset to the middle. Problem is that robot.mouseMove() calls MouseEvent (It does make sense) and resets the position and so I can't rotate. Thank you! 回答1: Because Robot is generating a native event, the event will (eventually) make it's way to the Event Queue for processing by the EDT. This means if you try and do something like... removeMouseListener(...); Robot.mouseMove(...); addMouseListener(...); It will, basically, have

WPF Not sending MouseMove events after CaptureMouse();

依然范特西╮ 提交于 2019-12-12 18:34:05
问题 I'm trying to have a WPF canvas with rounded rectangles on that I can drag round using the mouse. However once I try and capture the mouse on the canvas I don't get the move events any more. This is a "mycanvas" user control and the rectangles are "foo" user controls. The XAML for these (minus the preamble) are: mycanvas.xaml: <Canvas MouseDown="CanvasMouseDown" MouseMove="CanvasMouseMove" MouseUp="CanvasMouseUp" Background="White"> <my:Foo HorizontalAlignment="Left" Canvas.Left="97" Canvas

Robot.mouseMove does not work at all in Mac OS X

谁说我不能喝 提交于 2019-12-12 10:54:20
问题 I created java file in IntelliJ IDE, with that code import java.awt.AWTException; import java.awt.MouseInfo; import java.awt.Robot; public class JavaRobotExample { public static void main(String[] args) { int x = 12, y = 300; try { Robot robot = new Robot(); robot.mouseMove(x, y); int xAct = (int) MouseInfo.getPointerInfo().getLocation().getX(), yAct = (int) MouseInfo.getPointerInfo().getLocation().getY(); String sPred = String.format("Predicted mouse location : %, d, %, d", x, y), sAct =

Instant of custom control is disappear when click outside it

邮差的信 提交于 2019-12-12 10:22:29
问题 I need to make "work schedule bar". In MainForm has a bar. when user click on the bar.A ctrlPin will created. (ctrlPin is custom control has methods for drag-drop. So it' compound with Mousedown,MouseMove and MouseUp Events ) (I'am sorry. My account can't attach image. But you can see screen capture by this link.) -Problem clicking >>> http://imgur.com/3lxfB2b and http://imgur.com/mG6L5lD In mainFrom.vb will create new instant of my custom control. [MainForm.vb] Private Sub picBar_Day01

jQuery Mousemove: trigger on change of 5px

怎甘沉沦 提交于 2019-12-12 10:09:32
问题 For a number of technical reasons, I'm implementing my own 'draggable' feature on jQuery, rather than using jQuery UI, and I'm using mousedown and mousemove events to listen for the user trying to drag an element. It works good so far, I would just like to fire up the mousemove event every 5 px of movement, rather than pixel by pixel. I've tried coding a simple: $('#element').bind('mousemove', function(e) { if(e.pageX % 5 == 0) { // Do something } }); However, the movement is not stable every

Simulate a physical mouse move in Mac OS X

ぃ、小莉子 提交于 2019-12-12 07:52:12
问题 I'm looking for a way to simulate a mouse move event in Mac OS X 10.6. It would have to be defined in mouse units (rather than pixels — that is important!) I need this for an experiment which basically consists of drawing lines. Any ideas are welcome. Thank you! 回答1: One of the easiest ways to move the mouse in Mac OS X and other operating systems is to use a Java Robot. It can also simulate other events. For example, the mouse down or even a key press. However, it moves the pointer to a

What is the type of MouseEventArgs.X?

我只是一个虾纸丫 提交于 2019-12-12 05:16:32
问题 Working with C# in Visual Studio 2008 (.NET 3.5). Looking into System.Windows.Forms.MouseEventArgs . I'm seeing strange behavior with long Panel when I intercept handle the MouseMove event. It appears that MouseEventArgs.X goes from 0 to 32767, and wraps around to -32768. When I watch the variable in Visual Studio, it claims that it's of type int . Apparently it's a 16-bit signed integer the way it's behaving. Is this true? Is this a hard limit? Thanks! 回答1: This probably comes from the fact

How to apply transparency to a background that changes color smoothly

半城伤御伤魂 提交于 2019-12-12 04:45:00
问题 I want to make a div with transparent background smoothly changing color, the problem is that I need to have some content at the div which will not be transparent. I found this for changing the color <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"> </script> <script type="text/javascript"> $(document).ready(function() { setInterval ( "spectrum()", 1000 ); }); function spectrum(){ var hue = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math