Hi,
I have a UltraNumericEditor that I've attached a Windows UserControl to the drop down property ("Buttons Right" on the designer). The UltraNumericEditor is itself part of a modal dialog. I notice that the drop down user control is not dismissed when the user clicks on some part of the application other than the modal dialog. This is in contrast to how (for example) a Windows ComboBox works.
I have attached a very simple sample as it's easier to see the behavior than describe it. Simply run the app and dropdown the combo box. click on the main app. Notice the combo box closes. Now try the same thing with the Infragistics UltraNumericEditor.
Am I missing some simple property or something?
Thanks,
Andrew
I vaguely remember this coming up once, and it wound up being a limitation inherent with modality. We use a message filter to "listen" for mouse downs outside the bounds of the dropdown so as to close it, but being that a modal dialog blocks the main thread the message pump is essentially restricted to messages that come through that dialog, so the message filter doesn't get called. The reason the ComboBox doesn't have this problem is that it is a COM control that uses internal methods for accomplishing this, i.e., methods that are not available to a third party control.
Brian,
Thanks for the quick reply. What is the suggested work around so that the UltraNumericEditor works like Windows controls (comboboxes)?
The customer is used to the Windows behavior. It makes sense (to me) that if you click somewhere else, you are no longer interested in the dropdown.
The workaround is to not show the form modally. Doing so prevents messages sent by other forms from being processed, and without receiving a WM_MOUSEDOWN from something, the dropdown can;t possibly know it is supposed to close itself.