double-click

capture doubleclick for MonthCalendar control in windows forms app

妖精的绣舞 提交于 2019-12-05 11:28:38
How do I capture a doubleclick event of the MonthCalendar control? I've tried using MouseDown's MouseEventArgs.Clicks property, but it is always 1, even if I doubleclick. Do note that MonthCalendar neither shows the DoubleClick nor the MouseDoubleClick event in the Property window. Sure sign of trouble, the native Windows control prevents those events from getting generated. You can synthesize your own by watching the MouseDown events and measuring the time between clicks. Add a new class to your project and paste the code shown below. Compile. Drop the new control from the top of the toolbox.

Double click event on option of listbox not firing in IE

浪尽此生 提交于 2019-12-05 07:15:46
I want to attach an event to the option tags in a list box so that when I click one of them, it moves to another list box. I have this code: $('#' + opts.leftListId + ' > option').live('dblclick', function () { // Move the object }); Works fine in Firefox, but in IE the event is not fired at all. I can't use double click on the select node, because I need to move only the one that was clicked on. Any ideas? Try this instead: $('#' + opts.leftListId).find('option').each(function(){ $(this).live('dblclick', function () { // Move the object }); }); Update (10:21 GMT) Try taking out the live: $('#

WPF expand TreeView on single mouse click

烂漫一生 提交于 2019-12-05 05:42:28
I have a WPF TreeView with a HierarchicalDataTemplate. Currently I have to double click an item to expand/collapse it. I would like to change this behaviour to a single click, without loosing other functionality. So it should expand and collapse on click. What is the recommended way to do this? Thanks! You could use a re-templated checkbox as your node (containing whatever template you are currently using) with its IsChecked property bound to the IsExpanded property of the TreeViewItem. Here is a template I've just test that seems to do the job: <HierarchicalDataTemplate ItemsSource="{Binding

WPF Double Click TreeviewItem Child Node

我的梦境 提交于 2019-12-05 02:41:19
I have a treeview Item as such in a treeview that will have a list bound to it: <TreeViewItem Name="tviOffline" Foreground="Red" FontWeight="Bold" Header="Offline"> <TreeViewItem.ItemTemplate> <DataTemplate DataType="{x:Type local:Buddy}"> <StackPanel> <TextBlock Text="{Binding Nick}" FontSize="10" Foreground="#8CFFD528" /> </StackPanel> </DataTemplate> </TreeViewItem.ItemTemplate> </TreeViewItem> I cannot figure out how to get each of its childs to have a double click event. any help is appreciated. thanks much. <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}">

How to detect double click on list view scroll bar?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 02:04:04
I have two list view on WPF. The first listview is loaded with a Datatable. When double clicking on one item from the first listview, the selectedItem is moved to the second listview. The problem arises when appears an scroll bar in the first list view due to a lot of elements loaded from the DataTable. If a select one item and double click on the scroll bar down arrow, MouseDoubleClick event is launched and the selected item is moved to the second listview. How I can detect the double click on the scroll bar to prevent this? Thanks a lot! I tested the above code which was very helpful, but

ASP.NET prevent double clicking

人走茶凉 提交于 2019-12-04 21:40:12
I've looked at this before and found javascript that works for me with Google Chrome, Firefox, and IE when I test it but it seems randomly (or browser specific) it doesn't work. I need a solution that does work. This is what I'm currently using with jQuery: $(document).ready(function () { $("a.Once").one("click", function () { $(this).click(function () { return false; }); }); }); I add the class "Once" to buttons I want to make sure aren't clicked more than once. Again, It always works properly for me but for some users it doesn't do anything at all. Is there a better alternative solution that

how to detect double Click in NSTextField

佐手、 提交于 2019-12-04 17:38:26
I have a custom NSTextField and I'd like to detect double clicks by the user in the text field. My goal: I want to be able to double click on a parenthesis in an expression, such as "(2+2) = 4" and have it select everything inside the matching parentheses. Thought I could do this with... - (void)textView:(NSTextView *)textView doubleClickedOnCell:(id <NSTextAttachmentCell>)cell inRect:(NSRect)cellFrame atIndex:(NSUInteger)charIndex; but it never gets called in my custom NSTextField. Then I thought I could override -mouseDown, but that isn't getting called either. I'm stumped. Any suggestions

Custom Java-fx cellfactory messes up the setCellValueFactory

China☆狼群 提交于 2019-12-04 17:11:34
After messing around with Netbeans and Scenebuilder for a while I'm stuck at a problem I can't quite understand. I use a custom cellfactory to bind a doubleclick event to the cells in my tableview. But when I set the cellfactory and a cellValueFactory only the custom cellFactory has an effect. I'm trying to populate a tableview with data from a number of objects and bind a double click event to the cells of the first column. Populating is not the problem, I just used idNumber.setCellValueFactory(new PropertyValueFactory<LiveStock, String>("idNumber")); status.setCellValueFactory(new

Double click ambiguity in Jquery?

妖精的绣舞 提交于 2019-12-04 12:45:52
I am trying to set some text in window for single and double click in jquery . But I am facing the ambiguity for double click . When trying to do double click , first single click function works and then double click works. Similar question is here check here and it was very old. Also it has some problem. Any new answer using the latest jquery version. Check the live demo here of my problem live demo This my code , <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> </head> <body> <a id="press" href="http://jquery.com">Click here</a> <div id="log"></div

WPF DataGrid: CommandBinding to a double click instead of using Events

邮差的信 提交于 2019-12-04 07:58:05
问题 I know how to use the MouseDoubleClick event with my DataGrid to grab the selectedvalue, but how would one go about using command bindings instead? That way my ViewModel can handle the logic. So far I have the following: <DataGrid Name="TestGrid" Grid.Row="2" Grid.ColumnSpan="2" AutoGenerateColumns="True" MouseDoubleClick="TestGrid_MouseDoubleClick" ItemsSource="{Binding Registrations}" SelectedValue="{Binding CurrentRegistration}" IsReadOnly="True" AlternationCount="2" GridLinesVisibility=