UltraPopupControlContainer takes away the focus from the form. Is there a way to make it behave like the popup of a combo-box?
Hi,
Okay, but that doesn't change the answer. :)
If a control on your UserControl is taking focus, then the form will lose the focus. There's nothing the PopupControlContainer can do about this. You would have to create a UserControl that does not take the focus.
Sorry for the confusion, I mean the window/form itself is losing the focus once the popup control is shown and receives focus.
I tried this out and I guess I am a little confused by what you mean by "Accepts focus". I assumed you meant that you didn't want the control to take focus automatically when it is dropped down.
I created a UserControl with a TextBox on it and I put a breakpoint in the Enter event of the UserControl and the TextBox and neither of these get hit when I drop it down.
So are you trying to prevent the UserControl from taking focus when the user clicks on something within the UserControl? The PopupControlContainer has no control over this. You would have to create your UserControl in such a way that nothing on it takes focus.
It contains a UserControl.
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.