UltraPopupControlContainer takes away the focus from the form. Is there a way to make it behave like the popup of a combo-box?
Hi,
UltraPopupControlContainer does not take focus, but the control you are assigning to it may. What control are you using? I think you would have to create a control which does not allow itself to get focus in order to achieve what you want here.
It contains a UserControl.
So if there is an UltraTextEditor inside the UserControl, the parent window will lose the focus? Is there an AllowFocus property for UltraTextEditor?
No, I don't beleive so. UltraTextEditor has to take focus in order to function. There's no way around that.
I'm having the same issue. When I load a UltraPopupControlContainer within my application the control container will remove the "Active Window Status" away from the main application's title bar. When this occurs, the user is left asking "what application is Active now?".
If the control container is acting like a simple control (without a title bar) that hosts other controls, then it should not take Active Window status away from the main parent like a dialog will. Yes, focus is set elsewhere but that has nothing to do with the true undesirable behavior the control container is exhibiting.
So, is there a way to tell the control container to behave itself and act like a true Child Window rather than a Form/Dialog?
There really isn't anything we can do about this. A dropdown cannot be displayed as a "true child window" of the form, because if it were a child window, it's display would be limited to the bounds of the form it was on. But the dropdown needs to be able to go outside of those bounds. So it is displayed as a top-level window.
If any control within that window takes input focus, then the form it is on gets activated.
The way that we deal with this in our controls is the control in the dropdown doesn’t take focus and it also overrides the WndProc to handle the WM_MOUSEACTIVATE and return MA_NOACTIVATE. So you could create your own control for the dropdown and do the same thing.
Thanks Mike. Always nice to get an answer that makes perfect sense.