mousewheel

Child elements of scrollviewer preventing scrolling with mouse wheel?

只愿长相守 提交于 2019-11-27 07:35:31
I'm having a problem getting mouse wheel scrolling to work in the following XAML, which I have simplified for clarity: <ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" CanContentScroll="False" > <Grid MouseDown="Editor_MouseDown" MouseUp="Editor_MouseUp" MouseMove="Editor_MouseMove" Focusable="False" > <Grid.Resources> <DataTemplate DataType="{x:Type local:DataFieldModel}" > <Grid Margin="0,2,2,2" > <TextBox Cursor="IBeam" MouseDown="TextBox_MouseDown" MouseUp="TextBox_MouseUp" MouseMove="TextBox_MouseMove" /> </Grid> </DataTemplate> </Grid.Resources>

jquery mousewheel: detecting when the wheel stops?

天大地大妈咪最大 提交于 2019-11-27 04:37:24
I'm using Jquery mousewheel plugin and I would like like to be able to detect when the user has finished using the wheel. Similar functionality as the stop: event in the draggable stuff. Can somebody point me to the right direction? There's no "stop" event here really - you get an event when you do scroll, so every time a mousewheel event happens the event is triggered...when there's nothing you'll get no events and your handler won't be firing. You ca however detect when the user hasn't used it in say 250ms, like this: $("#myElem").mousewheel(function() { clearTimeout($.data(this, 'timer'));

Mousewheel event not firing

做~自己de王妃 提交于 2019-11-27 03:49:00
问题 I've looked at this thread concerning the exact same problem but that solution didn't work for me. Basically what I am trying to accomplish is a mouse wheel event when the user is interacting with a chart control on a windows form. Right now I have tried a few different things. public mainForm() { InitializeComponent(); this.chData.MouseWheel +=new MouseEventHandler(chData_MouseWheel); } Also I have tried adding this to the mainForm.Designer.cs: this.chData.TabIndex = 2; this.chData.Text =

jquery horizontal scroll with mousewheel

早过忘川 提交于 2019-11-27 03:38:42
问题 I currently have a site that is a sidescroller (http://www.studioimbrue.com) and I'm trying to bind a mousewheel to scroll sideways. Currently I'm using the one found at thehorizontalway.com (called thw.js) but it doesn't seem to work in all browsers (Chrome). I'm trying to get this one to work: http://brandonaaron.net/code/mousewheel/docs , to simply scroll the whole window, nothing else. There is very limited documentation so I can't figure it out. Any help is appreciated. 回答1: I just

How to make mouse wheel scroll to section like in mediafire.com [closed]

試著忘記壹切 提交于 2019-11-27 01:42:17
问题 I came across the home page of this website http://www.mediafire.com/, in which when you roll the mouse wheel the page position itself automatically to the next section in the page. I like to know how its done. Can anyone help me with this. Thanks in advance. Regards, Aswin 回答1: I think this type of animation is probably hard to take in especially someone new to jQuery. This involves scrolling, catching the mousewheel events, delay in animations, and most of all getting it to work properly on

How to add mouse wheel support to a component descended from TGraphicControl?

若如初见. 提交于 2019-11-26 23:08:25
I have created a delphi component which descends from TGraphicControl. Is it possible to add support for mouse wheels? --- Edit --- I've exposed the MouseWheel events as shown below but they aren't called. TMyComponent = class(TGraphicControl) published property OnMouseWheel; property OnMouseWheelDown; property OnMouseWheelUp; end; --- Edit --- As suggested below, I've tried to trap the WM_MOUSEWHEEL and CM_MOUSEWHEEL messages, but it doesn't seem to work. However I've managed to trap the CM_MOUSEENTER message. I don't understand why i can trap one type of message, but not the other. NGLN Due

Mousewheel event in modern browsers

旧时模样 提交于 2019-11-26 20:22:57
I'd like to have clean and nice JavaScript for mousewheel event, supporting only the latest version of common browsers without legacy code for obsolete versions, without any JS framework. Mousewheel event is nicely explained here . How to simplify it for the current latest versions of the browsers? I don't have access to all browsers to test it, so caniuse.com is a great help to me. Alas, mousewheel is not mentioned there. Based on Derek's comment, I wrote this solution. Is it valid for all browsers? someObject.addEventListener("onwheel" in document ? "wheel" : "mousewheel", function(e) { e

Python tkinter binding mousewheel to scrollbar

匆匆过客 提交于 2019-11-26 20:21:59
I have this scroll-able frame (frame inside canvas actually). import Tkinter as tk class Scrollbarframe(): def __init__(self, parent,xsize,ysize,xcod,ycod): def ScrollAll(event): canvas1.configure(scrollregion=canvas1.bbox("all"),width=xsize,height=ysize,bg='white') self.parent=parent self.frame1=tk.Frame(parent,bg='white') self.frame1.place(x=xcod,y=ycod) canvas1=tk.Canvas(self.frame1) self.frame2=tk.Frame(canvas1,bg='white',relief='groove',bd=1,width=1230,height=430) scrollbar1=tk.Scrollbar(self.frame1,orient="vertical",command=canvas1.yview) canvas1.configure(yscrollcommand=scrollbar1.set)

How can I differentiate a manual scroll (via mousewheel/scrollbar) from a Javascript/jQuery scroll?

放肆的年华 提交于 2019-11-26 18:49:44
UPDATE: Here is a jsbin example demonstrating the problem. UPDATE 2: And here is the fixed version thanks to fudgey . Basically, I have the following javascript which scrolls the window to an anchor on the page: // get anchors with href's that start with "#" $("a[href^=#]").live("click", function(){ var target = $($(this).attr("href")); // if the target exists: scroll to it... if(target[0]){ // If the page isn't long enough to scroll to the target's position // we want to scroll as much as we can. This part prevents a sudden // stop when window.scrollTop reaches its maximum. var y = Math.min

Mouse Wheel Event (C#)

六月ゝ 毕业季﹏ 提交于 2019-11-26 16:08:42
问题 I can't get the Mouse Wheel event in the main form. As a demo I came up with a simple example: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.panel1.MouseWheel += new MouseEventHandler(panel1_MouseWheel); this.panel1.MouseMove += new MouseEventHandler(panel1_MouseWheel); Form2 f2 = new Form2(); f2.Show(this); } private void panel1_MouseWheel(object sender, MouseEventArgs e) { if(e.Delta != 0) Console.Out.WriteLine(e.Delta); } } public partial class Form2 :