mousewheel

How to get mouse wheel to change the background image

馋奶兔 提交于 2019-12-24 19:26:45
问题 I am creating a UserControl and one behaviour I want it to have is that when the user rotates the mouse wheel over it then the background image alternates between two options. What I have so far is: <UserControl x:Class="OI.MR.UserControls.DataControls.ScrollWheel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com

How can I do both zoom and rotate on an inkcanvas?

戏子无情 提交于 2019-12-23 16:27:34
问题 Using the following XAML: <Grid x:Name="grid" Background="LightBlue" ClipToBounds="True"> <Grid.RowDefinitions> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Viewbox x:Name="imgViewbox" > <InkCanvas Grid.Row="0" Name="inkCanvas" Background="Red" > <Image Source="Images/pic.png" HorizontalAlignment="Left" x:Name="imgObject" VerticalAlignment="Top" /> <Label>Testing</Label> </InkCanvas> </Viewbox> </Grid> I am trying to rotate around the center of the image and also use the wheel mouse

Control key plus mouse wheel

 ̄綄美尐妖づ 提交于 2019-12-23 07:40:15
问题 What's the better way to handle the ctrl + mouse wheel in C#? I've figured out how to handle the MouseWheel event but how to know that the ctrl key is being pressed too? Thanks in advance. 回答1: Use the static property like: System.Windows.Forms.Control.ModifierKeys 来源: https://stackoverflow.com/questions/268796/control-key-plus-mouse-wheel

How to use my trackpad for horizontal mousewheel scrolling in a Java AWT ScrollPane

≡放荡痞女 提交于 2019-12-22 05:18:20
问题 Like many modern mice and trackpads, my laptop supports vertical and horizontal scrolling. It's an addictive feature once you get used to it. I simply want my Java apps to support horizontal scrolling via the trackpad/mousewheel, but everywhere I search it seems that this is not possible in Java. I really want someone to tell me that I'm somehow doing it wrong, this feature is already requested behaviour: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6440198 The inability to do this

Flex Spark List Mouse Wheel Scroll Speed

China☆狼群 提交于 2019-12-22 04:48:17
问题 I have a component extending a Spark List, and when I scroll using the mouse wheel it scrolls too much in one go. I have tried looking for the handler that deals with mouse wheel scrolling in the List class and VerticalLayout class to override but I cannot find it. Is there another way I'm supposed to change this, or am I missing something? 回答1: The "delta" property of MouseEvent.MOUSE_WHEEL defines how many lines will be scrolled by one wheel-scrolling. You could try changing it in the MOUSE

OSX inertia scrolling causing mousewheel.js to register multiple mousewheel events with the slightest scroll motion

泄露秘密 提交于 2019-12-21 05:21:27
问题 I have a pretty standard Flexslider instance I'm working on. Flexslider incorporates well with the jquery.mousewheel.js plugin, allowing slides to move on mousewheel events. However, Mac OSX and others employ 'intertia' to scrolling effects, making it virtually impossible to scroll only one slide left or right. The general effect is that even the slightest scroll motion in these situations triggers multiple mousewheel events and scrolls the slider multiple images left or right. Obviously,

How to read out scroll wheel info from /dev/input/mice?

♀尐吖头ヾ 提交于 2019-12-21 05:02:23
问题 For a home robotics project I need to read out the raw mouse movement information. I partially succeeded in this by using the python script from this SO-answer. It basically reads out /dev/input/mice and converts the hex-input into integers: import struct file = open( "/dev/input/mice", "rb" ) def getMouseEvent(): buf = file.read(3) button = ord( buf[0] ) bLeft = button & 0x1 bMiddle = ( button & 0x4 ) > 0 bRight = ( button & 0x2 ) > 0 x,y = struct.unpack( "bb", buf[1:] ) print ("L:%d, M: %d,

Pass mousewheel event through fixed content

笑着哭i 提交于 2019-12-20 17:39:02
问题 The best way to understand this is to look at this fiddle. Notice how mouse wheel over the fixed content in the red box does nothing. I would like the scrollable div to scroll. In case the fiddle dies - basically I have a scrollable div with a fixed element over it. Typically when you mouse wheel over a scrollable div it will of course scroll. But if you are over the fixed element instead then no scroll happens. Depending on your site layout this could be counter intuitive to a user. jQuery

Pass mousewheel event through fixed content

戏子无情 提交于 2019-12-20 17:38:03
问题 The best way to understand this is to look at this fiddle. Notice how mouse wheel over the fixed content in the red box does nothing. I would like the scrollable div to scroll. In case the fiddle dies - basically I have a scrollable div with a fixed element over it. Typically when you mouse wheel over a scrollable div it will of course scroll. But if you are over the fixed element instead then no scroll happens. Depending on your site layout this could be counter intuitive to a user. jQuery

oxyplot axis locking center when mouse wheel

…衆ロ難τιáo~ 提交于 2019-12-20 04:23:35
问题 I'm new to wpf and oxyPlot. Now, I want create a dynamic line chart like an oscilloscope, but I don't know how to lock the axis on a value when mouse wheel zooms. Example: The red point is mouse location. In normal, zoom A -> B, zoom C -> D. now, I want to zoom C ->E, like mouse location at 0 center. 回答1: I've found a solution that works for blocking an axis zoom center. You have to create a custom LinearAxis to achieve this: public class FixedCenterLinearAxis : LinearAxis { double center = 0