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

Removing standard caption button

Hi
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 ?

Thanks





3 Replies

AD Administrator Syncfusion Team 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.

[C#]

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.

[C#]

this.dockingManager1.EnableContextMenu = false;

Please let me know if this helps you.

Regards,
Jaya




EF Eric Ferro May 2, 2008 07:22 PM UTC

Hi
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 :)



AD Administrator Syncfusion Team 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.
http://www.syncfusion.com/support/kb/tools/Default.aspx?ToDo=view&questId=22

Please let me know if it is helps.

Regards,
Hema



Loader.
Live Chat Icon For mobile
Up arrow icon