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.
Unfortunately, activation email could not send to your email. Please try again.

Removing standard caption button

Thread ID:

Created:

Updated:

Platform:

Replies:

73341 May 2,2008 02:44 AM Jul 25,2008 02:20 AM Windows Forms 3
loading
Tags: Tools
Eric Ferro
Asked On May 2, 2008 02:44 AM

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





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

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



Eric Ferro
Replied On May 2, 2008 03:22 PM

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


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

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



CONFIRMATION

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.

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.

;