Hi,
I have a UltraCombo control. Its AutoCompleteMode is set to None. When I click on the editor of the control, I want to display the dropdown. I tried the Click event but this event fires also when you click on the dropdown button. I am looking for an event that works specifically for the editor part of the control only. Any other event I can use to accomplish this?
Thanks,
Jason
Hi Mike,
Thanks for replying my question.
Let me clarify a little bit. First I need to be able to type in the combo. Second, when I click on the editor part of the combo I want the drop down to display. But when I click on the dropdown button, it should work as it is (Click to show dropdown list and click again to hide dropdown list). When I use UltraCombo's MouseDown/MouseUp/Click event, it applies to all area of the control (versus just the Editor part of the control). I think the UIElements you mention might be the one I am looking for. Could you show me some sample code?
The code here http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.1/CLR2.0/html/Infragistics2.Win.UltraWinGrid.v12.1~Infragistics.Win.UltraWinGrid.UltraCombo~UIElement.html
seems to serve my purpose. Do I still need to hook the Click event of the TextBox?
Hi Jason,
It sounds like you want to set DropDownStyle to DropDownList. Then the control will always drop down when it is clicked and the user will only be able to choose a value from the list - they won't be able to type into the combo.
If I am wrong, and that's not what you want, then I need a little clarification. You can probably use the MouseDown or MouseUp event and use the UIElements to determine which part of the control was clicked. But it makes a difference whether the control is already in edit mode or not, because when it's in edit mode, it will be displaying a TextBox control over itself. So you might need to hook the Click event of the TextBox instead of the combo - it depends on the behavior you want.