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

Force the Ribbon Control Menu to Close

I have a Ribbon Control with a ToolStrip ComboBox in the Main Panel. I have a DropDownClosed Event Handler on the ToolStrip ComboBox. After selecting from the ComboBox the Ribbon Menu is not closing unless I Click on the Form or hit Escape. Is there a way I can force it to close after selecting from the ToolStrip ComboBox?


4 Replies

FS Fathima Shalini P Syncfusion Team December 19, 2008 06:49 AM UTC

Hi,

Thank you for your interest in Syncfusion Products.

I have tested the issue with the simple sample in version 6.4.0.15. I have added a ToolStripComboBox and ToolStripComboBoxEx controls in the ToolStripEx that is placed in RibbonControlAdv. I have implemented the DropDownClosed event for both. I am afarid that I was not able to reproduce the issue. Please refer to the sample given below:

http://websamples.syncfusion.com/samples/Tools.Windows/F78548/main.htm

Could you please let me know what version are you using and also whether you are trying to perform any action in DropDownClosed event, so that I can test the issue further and provide you a better solution?

Please let me know if any concerns.

Regards,
Fathima



JS John Slater December 19, 2008 12:37 PM UTC

Hi,

THe example you provided is not the same layout that I have described. I have attached the revised layout. AFter selecting from the ComboBox in the Office Menu Dropdown Button, I would like the Menu to automatically close.
Thanks

>Hi,

Thank you for your interest in Syncfusion Products.

I have tested the issue with the simple sample in version 6.4.0.15. I have added a ToolStripComboBox and ToolStripComboBoxEx controls in the ToolStripEx that is placed in RibbonControlAdv. I have implemented the DropDownClosed event for both. I am afarid that I was not able to reproduce the issue. Please refer to the sample given below:

http://websamples.syncfusion.com/samples/Tools.Windows/F78548/main.htm

Could you please let me know what version are you using and also whether you are trying to perform any action in DropDownClosed event, so that I can test the issue further and provide you a better solution?

Please let me know if any concerns.

Regards,
Fathima





Tools_WF_RibbonControlAdv_F78548Revised_c0323bf6.zip


FS Fathima Shalini P Syncfusion Team December 20, 2008 07:26 AM UTC

Hi,

Thank you for your detailed update.

In order to close the MenuButton's dropdown when the ToolStripComboBox's dropdown is closed, we need to invoke the MenuButtonDropDown's Close method in the ToolStripComboBox's DropDownClosed event. Please refer to the code snippets given below that illustrates this:


private void toolStripComboBox1_DropDownClosed(object sender, EventArgs e)
{
this.ribbonControlAdv1.MenuButtonDropDown.Close();
}


Please let me know if any concerns.

Regards,
Fathima



JS John Slater December 20, 2008 03:08 PM UTC

Thanks,

It is now working.

>Hi,

Thank you for your detailed update.

In order to close the MenuButton's dropdown when the ToolStripComboBox's dropdown is closed, we need to invoke the MenuButtonDropDown's Close method in the ToolStripComboBox's DropDownClosed event. Please refer to the code snippets given below that illustrates this:


private void toolStripComboBox1_DropDownClosed(object sender, EventArgs e)
{
this.ribbonControlAdv1.MenuButtonDropDown.Close();
}


Please let me know if any concerns.

Regards,
Fathima




Loader.
Live Chat Icon For mobile
Up arrow icon