double-click

WPF - Inherit TabControl and customize the style

血红的双手。 提交于 2019-12-11 07:22:49
问题 I want to inherit the default TabControl and handle the event double-click TabItem Header. This is XAML file: <local:MyTabControl x:Class="MyTabControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:CustomizedTabControl" mc:Ignorable="d"> <local:MyTabControl

Differentiate single click from double click in pyside

一个人想着一个人 提交于 2019-12-11 02:41:48
问题 I have tried to implement in Pyside the method described in How to distinguish between mouseReleaseEvent and mousedoubleClickEvent on QGrapnhicsScene, but I had to add a crufty flag to keep it from showing single click after the second button release in a double click. Is there a better way? import sys from PySide import QtGui, QtCore class Example(QtGui.QWidget): def __init__(self): super(Example, self).__init__() """an attempt to implement https://stackoverflow.com/questions/18021691/how-to

Distinguish between single and double click with matplotlib

一个人想着一个人 提交于 2019-12-11 01:03:05
问题 I'm trying to catch single clicks and double clicks on my figure. As stated in another answer, the event contains event.dblclick which is False or True, at least in Version 1.4.2, so double clicks can be got. The only problem is that it's not easy to distinguish between a single click and a double click because when double-clicking the event gets fired twice. The first time it's with event.dblclick=False and the second time it's with event.dblclick=True . Is there any solution to this? I saw

Double-click autofill - dynamic based on adjacent cell

隐身守侯 提交于 2019-12-10 23:43:37
问题 I need to do: I am using the normal auto-fill function in Excel (double click the dot on the side of a cell) to copy the contents to the sub cells, so in this case clicking the dot in Cell A1 will do this: I need a script that will repeat the process down the entire column, until there are no more values in the adjacent cell. 回答1: Presumably this is what you're looking for: Option Explicit Sub FillInTheBlanks() Dim StartCell As Range, EndCell As Range Set StartCell = ActiveCell Set EndCell =

How do I recognize mouse clicks in Scala?

回眸只為那壹抹淺笑 提交于 2019-12-10 20:08:45
问题 I'm writing a small GUI program. Everything works except that I want to recognize mouse double-clicks. However, I can't recognize mouse clicks (as such) at all, though I can click buttons and select code from a list. The following code is adapted from Ingo Maier's "The scala.swing package": import scala.swing._ import scala.swing.event._ object MouseTest extends SimpleGUIApplication { def top = new MainFrame { listenTo(this.mouse) // value mouse is not a member of scala.swing.MainFrame

Detect doubleclick on cell of TableView JavaFX

有些话、适合烂在心里 提交于 2019-12-10 19:31:36
问题 I am trying to detect a doubleclick on a random cell of a tableview. The detection of the doubleclick is not a problem but rather which cell has been doubleclicked. table.addEventFilter(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() { @Override public void handle(MouseEvent event) { if (event.getClickCount() > 1) { System.out.println("double clicked!"); TableCell c = (TableCell) event.getSource(); System.out.println("Cell text: " + c.getText()); } } }); This is how I'm building my

Invoke a ContextMenu to open

我只是一个虾纸丫 提交于 2019-12-10 17:57:15
问题 I need to do something like Google Maps does (but in WPF ): when RightClick on the map I have a ContextMenu. when RightDoubleClicking I have the UnZoom action. So, apparently, this is a little difficult in WPF... After struggling and searching a lot, read people that compains that "we can't predict the future" (I ask myself how does Google predict it), I decided to "wait" SystemInformation.DoubleClickTime and only then display a contextMenu. Surely, this is not ideal, even human-observable,

Java : detect triple-click without firing double-click

做~自己de王妃 提交于 2019-12-10 17:17:59
问题 I have a JTable in which I want to call a function when a cell is double-clicked and call another function when the cell is triple-clicked. When the cell is triple-clicked I do not want to call the double-click-function. What I have right now is (mgrdAlarm is the JTable) : mgrdAlarm.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { System.out.println("getClickCount() = " + e.getClickCount()); if (e.getClickCount()==2) { doubleClick(); System.out.println("Completed

Why always calling mousePressEvent before mouseDoubleClickEvent

99封情书 提交于 2019-12-10 16:27:34
问题 please consider the following code: #include <QWidget> #include <iostream> #include <QApplication> class Widget : public QWidget { public: void mousePressEvent(QMouseEvent* event) { std::cout << "mousePressEvent" < std::endl; } void mouseDoubleClickEvent(QMouseEvent* event) { std::cout << "mouseDoubleClickEvent" << std::endl; } }; int main(int argc, char** argv) { QApplication app(argc, argv); Widget w; w.show(); return app.exec(); } Every time I process double click, the output is:

Starting a jar with double click starts in 32bit JVM, but from console in 64bit JVM

◇◆丶佛笑我妖孽 提交于 2019-12-10 15:56:47
问题 Since I'm using native libraries I have different JARs for 32bit and 64bit platforms. Now when there are two JVMs installed on the system, one 32bit and one 64bit I face this behaviour: Double clicking the 32bit JAR -> works Double clicking the 64bit JAR -> App doesn't start Starting the 32bit JAR from console -> Error: This Java instance does not support a 32-bit JVM.Please install the desired version. Starting the 64bit JAR from console -> works On Mac I can start the 32bit JAR from console