I have a project in which I have several different controls dynamically added to a panel which I do not have total control over. With most windows controls, if I click on space in the panel that contains no controls, focus leaves the current control and switches to the panel, which is the behavior I need. With the UltraComboEditor control, it refuses to give up focus unless I click on another control. Clicking in the empty panel area does nothing. Unfortunately, I cannot add a Click event to this panel to get around this. Is there a property I can set on the UltraComboEditor that will revert the behavior of the Infragistics control back to the behavior of the other ordinary windows controls? Or an UltraComboEditor event I can use to get around this issue?
Hi,
Okay, I tried this out again with an UltraComboEditor and a ComboBox on a Panel with AutoScroll turned on.
When I click the UltraComboEditor (without dropping it down) and use the MouseWheel, the UltraComboEditor scrolls through the selected items.
If I click on the panel, this has no effect, because a Panel does not take focus.
When I do the same thing with the ComboBox control, I get the same results. Once again, the panel does not take focus and clicking on it has no effect.
Three is no way to change this behavior that I know of.
I'm attaching my VS2005 project here so you can try it out.
All the controls are inside the panel.
I am not talking about the first click that closes the dropdown. I will get more specific, which will hopefully help explain what I'm looking for. While the control's dropdown is closed up, scrolling with the mousewheel changes the selection without dropping down. I wish for the user to be able to, at this point when the dropdown is closed, click on the panel and have the control lose focus and the mousewheel will now scroll the entire panel. This seems to work with other controls.
I also tried, as a workaround, to set up an event where if the mousewheel is scrolled while the dropdown is closed, the focus will shift. However UltraComboEditor.MouseWheel does not seem to ever fire, regardless of the state of the dropdown.
I couldn't run your solution as I am using Visual Studio 2005, sorry.
Panel controls, as far as I know, do not take focus.So are you saying that focus is going to some other control on the panel?
Is the UltraComboEditor on the panel or outside it? It seems like you are saying that the combo is outside the panel.
I did a quick test using both an UltraComboEditor and a ComboBox control. I also placed a panel on the form with a button on it.
If I drop down the UltraComboEditor and click on the button or anywhere in the panel or the form, the dropdown closes, but nothing else gets focus. The Button click event does not fire, nor does the panel or the button's enter events. The first click anywhere just closes the dropdown.
If I do the same thing with the ComboBox control, I get the same results.
I have attached my sample project here in case you want to try it.
There is no way to change this behavior.