We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

DropDownBarItem behavior changed in version 3.3.0 ?

Hi, I have a WinForms app which was working as desired until we upgraded to version 3.3. Now I have a problem with a toolbar button of mine that is based on the DropDownBarItem. Basically it''s an Undo toolbar button that''s an attempt to act like a MS Office undo button -- it''s supposed to pop up a list of the things that can be Undone. Anyway, as soon as we upgraded to version 3.3.0 my Undo button stopped working. I can click the little triangle to the right of the toolbar button, and that causes the popup to display. But then as soon as I mouse down over the popup, it automatically gets dismissed. So I can''t actually click on the popup because it''s gone. I''ve only just started investigating this. All I know so far is that PopupControlContainer.OnCloseUp is being called, and not being called by my code. Did version 3.3 change the behavior of DropDownBarItem objects in a way that might explain the change I''m seeing?

5 Replies

DS Dave Smith October 3, 2005 10:22 PM UTC

I have more info: I think the change in behavior that I''m seeing has to do with changes to Focus. In my case, I have a user control that I''m displaying in a popup, and my usercontrol includes, among other things, a listbox. In my usercontrol code, when I get a MouseEnter event indicating the user has moused over the list, I call listbox.Focus() to put the focus on the list. Calling Focus() seems to be what''s causing the popup to be dismissed. I didn''t have this problem until I upgraded to version 3.3.0. Would this popup-dismiss behavior be considered a bug? It seems like a bug to me. I think I need the ability to set which control on my UserControl has the focus. But apparently I need to refrain from calling Focus() because doing so seems to dismiss the popup.


AD Administrator Syncfusion Team October 4, 2005 01:03 PM UTC

Hi Dave, Thanks for bringing this issue to our attention. I do see this problem here and have notified the development team in this regard. We have logged a bug report Defect#839 in this regard, and will try our very best to address the same at the earliest. You could track the progress of this bug fix at this link below : Defect #839 - PopupControlContainer closes when Focus method of ListBox is called. We appreciate your patience and thanks for your feedback. Regards, Ebenezer.P


AD Administrator Syncfusion Team November 3, 2005 08:11 PM UTC

Hi! Is there a work around for this, we too are seeing the same problem. Actually as soon as we click the listbox on the custom control, the popup container closes. Please help! Thanks, Bits


AD Administrator Syncfusion Team November 7, 2005 01:21 PM UTC

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


AD Administrator Syncfusion Team November 9, 2005 08:31 PM UTC

Hi! Ebenezer, Thanks for the work around. The sample doesn''t show exactly the problem we are having, so I opened a direct-trac with the modified sample. Thanks, Bits.

Loader.
Live Chat Icon For mobile
Up arrow icon