Hi Bits,
It is possible to avoid this problem by including the following code
1)UserControl1.cs:
private bool m_bShouldCloseOnFocused = true;
public bool ShouldCloseOnFocused
{
get
{
return m_bShouldCloseOnFocused;
}
}
private void UserControl1_MouseEnter(object sender, System.EventArgs e)
{
m_bShouldCloseOnFocused = false;
listBox1.Focus();
m_bShouldCloseOnFocused = true;
}
2) Form1.cs:
this.popupControlContainer1.BeforeCloseUp += new CancelEventHandler(popupControlContainer1_BeforeCloseUp);
private void popupControlContainer1_BeforeCloseUp(object sender, CancelEventArgs e)
{
e.Cancel = ! this.userControl11.ShouldCloseOnFocused;
}
I have attached a sample that illustrates this.Let me know if this meets your requirement.
We appreciate your cooperation.
Regards,
Ebenezer.P
DropDownBarItem0.zip