drag

WPF Datagrid scrolls up a bit when scrolled to end

橙三吉。 提交于 2019-12-11 17:59:57
问题 I have a WPF Datagrid (4.0 on Win7). When it is scrolled to very end by dragging (after dragging) the thumb it sometimes returns a bit when released and mouse cursor moves away (probably to start with a complete line). I tried to set CanContentScroll property of DG_ScrollViewer (see WPF DataGrid : CanContentScroll property causing odd behavior) but the grid become unusably slow when populated with lot of data. The problem doesn't occur when scrolling is done by mouse wheel (after scrolling

Moving a Node within its parent pane, and dropping it to another

十年热恋 提交于 2019-12-11 17:07:24
问题 Moving a node ( Label in this case) within its parent Pane (lets call it moving), works as expected by adding appropriate handlers for MouseEvent : node.setOnMousePressed(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent mouseEvent) { x = node.getLayoutX() - mouseEvent.getSceneX(); y = node.getLayoutY() - mouseEvent.getSceneY(); } }); node.setOnMouseDragged(new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent mouseEvent) { node.setLayoutX(mouseEvent

Disable web view vertical drag without clipping the content

人走茶凉 提交于 2019-12-11 15:12:03
问题 Hy every one, I have a web view on which I load HTML content for epub books. The web view content is paginated so the user can flip through the pages horizontally while reading the e-book. I use onFlingDo to swipe left and right and allow the user to surf the content. I have customized my webview as shown below: public class newBTWebView extends WebView implements QuickAction.OnDismissListener, PopoverView.PopoverViewDelegate, GestureDetector.OnGestureListener { public newBTWebView(Context

WinForms window drag event

点点圈 提交于 2019-12-11 14:53:28
问题 Is there an event in WinForms that get's fired when a window is dragged? Or is there a better way of doing what I want: to drop the window opacity to 80% when the window is being dragged around? Unfortunately this is stupidly tricky to search for because everyone is looking for drag and drop from the shell, or some other object. 回答1: It's the LocationChanged event you want: private void YourApp_LocationChanged(object sender, EventArgs e) { this.Opacity = 0.8; } You'll have to override WndProc

Drag & sweep with Cocoa on iPhone

為{幸葍}努か 提交于 2019-12-11 12:41:40
问题 I'm about to start a new iPhone app that requires a certain functionality but I'm not sure if it's doable. I'm willing to research but first I just wanted to know if I should at least consider it or not. I haven't seen this in an app before (which is my main concern, even though I haven't seen too many apps since I don't own an iPhone), but an example would be the iPhone shortcuts panels: you can hold on an app, and then drag it to another panel, sweeping while still dragging it. But this is

AjaxControlToolKit ModalPopupExtender Drag snap back to center

时光总嘲笑我的痴心妄想 提交于 2019-12-11 11:03:06
问题 I am using ModalPopupExtender of AjaxControlToolKit 4.0 (ASP.NET 4.0), every thing working fine, when I drag ModalPopup it is dragging, but the problem is that it is snaping back to its original location(Center). The same code is working on: http://www.asp.net/AjaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx I have search about this issue but all solutions are given by using external Java script code, but what can be the mistake on following code while the same code working

iPad prevent page drag

邮差的信 提交于 2019-12-11 10:52:59
问题 I am writing an application for iPad using phonegap (Simple application using HTML5 and jQuery). The problem is the application window is draggable, as seen in image when I drag window down it comes down and when I leave window it goes up automatically. I don't want this behavior. 回答1: Try to set the UIWebViewBounce to NO in your file Cordova.plist . Check this link: How to prevent app running in phone-gap from scrolling vertically? Note: with this solution, you may disable the "landscape

Disable OnClickListener while scaling or dragging a View

感情迁移 提交于 2019-12-11 09:42:56
问题 Hi I'm using MPAndroidChart and my added OnClickListener is triggered right after i zoomed into or dragged a chart. How can i disable this behavior? This are my chart properties: chart.setTouchEnabled(true); chart.setScaleEnabled(true); chart.setDragEnabled(true); chart.setPinchZoom(true); chart.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //this only should run if i really click on the chart, not if i zoom or drag it. ... }); Is there an easy way to

move chromeless windowedapplication on drag in flex 4

ⅰ亾dé卋堺 提交于 2019-12-11 08:38:15
问题 I have implemented a chromeless windowedapplication in flex 4. But doing so i noticed that all the maximize, minimize and even the ability to drag the window around is gone. I need the ability to drag the window around. I have done a lot of googling and have been unable to come up with anything. Could somebody plz point me in the right direction. Thanks in advance. 回答1: You'll have to create a custom skin for your WindowedApplication. If you look in the code of WindowedApplication, you'll

Why isn't the d3 voronoi polygon drag event triggering on polygons in force simulation?

谁说我不能喝 提交于 2019-12-11 08:03:33
问题 Following this example, why isn't drag event triggering on the polygons in the following code? var data = [ { "index" : 0, "vx" : 0, "vy" : 0, "x" : 842, "y" : 106 }, { "index" : 1, "vx" : 0, "vy" : 0, "x" : 839, "y" : 56 }, { "index" : 2, "vx" : 0, "vy" : 0, "x" : 771, "y" : 72 } ] var svg = d3.select("svg"), width = +svg.attr("width"), height = +svg.attr("height"); var simulation = d3.forceSimulation(data) .force("charge", d3.forceManyBody()) .force("center", d3.forceCenter(width / 2,