Hi allI have a simple form (Framework 3.5 and VS 2012) with two controls on it.One standard TextBox and one UltraTextEditor (12.1).On both I hook to the Click event:- this.textBox1.Click += new System.EventHandler(this.textBox1_Click);- this.ultraTextEditor1.Click += new System.EventHandler(this.ultraTextEditor1_Click);When I now click on the standard TextBox, the event is fired.When I click on the UltraTextEditor, the event is not fired.What am I doing wrong ??Thanks and best regardsFrank Uray
FAQ:Mouse events such as MouseDown, MouseUp, and DoubleClick do not fire for an UltraWinEditor it is in edit mode.
link does not work: "Page Error"
Hi Frank,
I just tried it and it's working fine for me. Can you try again?
Hi,
I just tried it and I am able to open the C# project linked above in VS2012 with no problem. VS will prompt you to upgrade the sample, of course, but the upgrade process is very simple and it works just fine for me. You will probably need to upgrade the problem itself the version of the Infragistics assemblies you are using. But even if you don't want to do that, you can still look at the code in the sample and apply it to your application.
Anyway, just in case you are still unable to get to the sample, I copied the code for you here:
//Handles UltraCalculatorDropDown1.ControlAdded, UltraColorPicker1.ControlAdded, UltraComboEditor1.ControlAdded, UltraCurrencyEditor1.ControlAdded, UltraDateTimeEditor1.ControlAdded, UltraFontNameEditor1.ControlAdded, UltraNumericEditor1.ControlAdded, UltraTextEditor1.ControlAdded public void UltraWinEditor_ControlAdded(object sender, System.Windows.Forms.ControlEventArgs e) { e.Control.MouseDown+= new MouseEventHandler(UltraWinEditor_Editor_MouseDown); e.Control.MouseUp+= new MouseEventHandler(UltraWinEditor_Editor_MouseUp); e.Control.Click+= new EventHandler(UltraWinEditor_Editor_Click); e.Control.DoubleClick+= new EventHandler(UltraWinEditor_Editor_DoubleClick); } public void UltraWinEditor_ControlRemoved(object sender, System.Windows.Forms.ControlEventArgs e) { e.Control.MouseDown-= new MouseEventHandler(UltraWinEditor_Editor_MouseDown); e.Control.MouseUp-= new MouseEventHandler(UltraWinEditor_Editor_MouseUp); e.Control.Click-= new EventHandler(UltraWinEditor_Editor_Click); e.Control.DoubleClick-= new EventHandler(UltraWinEditor_Editor_DoubleClick); }#region Editor Events private void UltraWinEditor_Editor_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { Control c = (Control)sender; this.EventListBox.Items.Add(c.Parent.Name + "_Editor_MouseDown"); } private void UltraWinEditor_Editor_MouseUp(Object sender, System.Windows.Forms.MouseEventArgs e) { Control c = (Control)sender; this.EventListBox.Items.Add(c.Parent.Name + "_Editor_MouseUp"); } private void UltraWinEditor_Editor_Click(Object sender, System.EventArgs e) { Control c = (Control)sender; this.EventListBox.Items.Add(c.Parent.Name + "_Editor_Click"); } private void UltraWinEditor_Editor_DoubleClick(Object sender, System.EventArgs e) { Control c = (Control)sender; this.EventListBox.Items.Add(c.Parent.Name + "_Editor_DoubleClick"); }#endregion
did you ever get a resolution? We are having the same issue over here and want to know what to do to resolve. The only answer I see is a very broad one, and the C# sample does not open in VS2012:
----------------------------------
If you need to trap these events, it can be done by trapping the ControlAdded and ControlRemoved events. These events fire when the edit windows are created and destroyed. Inside these events, you can dynamically hook into the Mouse events of the edit control in order to respond to Mouse operations inside the edit control.
-----------------------------------
Can someone explain how to do this?
Thanks
thanks !
no, it does not work.This is the resolved URL:http://devcenter.infragistics.com/ErrorHandler.aspx?aspxerrorpath=/Support/KnowledgeBaseArticle.aspx
I copied the text of the article here:
If an UltraWinEditor control is in edit mode, it displays an edit window over the control. In this case, clicking on the control will not fire the MouseDown, MouseUp, or Click events of the control. This applies to MouseDown, MouseUp, MouseEnter, MouseLeave, MouseHover, MouseMove, Click, anc DoubleClick.
The reason these events do not fire is because the click actually takes place on the edit window and not the UltraWinEditor Control. The control, therefore, gets no messages and fires no events. This is the correct behavior. The same behavior can be seen with other DotNet controls that display child edit windows, like the Microsoft Grid.If you need to trap these events, it can be done by trapping the ControlAdded and ControlRemoved events. These events fire when the edit windows are created and destroyed. Inside these events, you can dynamically hook into the Mouse events of the edit control in order to respond to Mouse operations inside the edit control. The attached samples demonstrate this technique for the MouseDown, MouseUp, Click, and DoubleClick events.
ultrawineditors_edit_window_mouse_events_cs.zip Sample showing how to trap mouse events when the mouse is over an UltraWinEditor control in edit mode. C#.ultrawineditors_edit_window_mouse_events_vb.zip Sample showing how to trap mouse events when the mouse is over an UltraWinEditor control in edit mode. VB.