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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Removing standard caption button

Thread ID:





73341 May 2,2008 06:44 AM UTC Jul 25,2008 06:20 AM UTC WinForms 3
Tags: Tools
Eric Ferro
Asked On May 2, 2008 06:44 AM UTC

I want to remove a standard button from a docking view, for example the menu button.

First i try to remove it from the CustomCaptionButtons collection. This works but if i hide the view and show it again, the button is again visible.

Then i try SetMenuButtonVisibility but this does nothing :(
this.dockingManager1.SetMenuButtonVisibility(this.groupBar1, false);

How can i remove a standard caption button ?


Administrator [Syncfusion]
Replied On May 2, 2008 10:07 AM UTC

Hi Eric,

Thank you for using Syncfusion products.

To remove the standard caption buttons associated with the docking manager, you can use the following code snippet.


this.dockingManager1.CaptionButtons.RemoveAt(index);// where index is the index of the button to remove.

To remove the ContextMenu associated with the docking manager, you can use the following code snippet.


this.dockingManager1.EnableContextMenu = false;

Please let me know if this helps you.


Eric Ferro
Replied On May 2, 2008 07:22 PM UTC

I found that method like SetMenuButtonVisibility does not work in the form constructor neither the load event.

The same code works perfectly in the activated event for example.

This is normal ?

BTW, my turarnound works fine now :)

Administrator [Syncfusion]
Replied On July 25, 2008 06:20 AM UTC

Hi Eric,

Sorry for the delay response.

This is the Normal behavior of Docking Manager. The best way to perform Custom Initialization is newDockStateEndLoad event.

Please refer the following KB related to this.

Please let me know if it is helps.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon