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 CaptionButton

Thread ID:

Created:

Updated:

Platform:

Replies:

70547 Dec 14,2007 07:09 AM Dec 18,2007 08:49 AM Windows Forms 2
loading
Tags: Tools
Stefan Smith
Asked On December 14, 2007 07:09 AM

Hi,

I'd like to remove caption buttons programmatically from a dock control but without effecting the default caption button collection for the DockingManager. How can I do this?


Pavan Kumar K [Syncfusion]
Replied On December 18, 2007 08:44 AM

Hi Stephen,

Thanks for your interest in Syncfusion products.

You can remove the Custom Caption Button using the Remove() method of CaptionButtonsCollection.

Here is the sample code snippet.



private void buttonAdv1_Click(object sender, EventArgs e)
{
try
{
DialogResult result = MessageBox.Show("Do you want to Remove Custom

Button??", "Remove...", MessageBoxButtons.OKCancel);

if (result == DialogResult.OK)
{
//In Remove method Pass the argument as name of the custom button

cbGroupBar1.Remove(previous);


MessageBox.Show("succesfully Removed", "Removed..");
}
else if (result == DialogResult.Cancel)
{
MessageBox.Show("Removal Process Cancelled..");
}
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}


}




Please refer the sample and let me know if this helps.

rel='nofollow' href="
http://websamples.syncfusion.com/samples/Tools.Windows//I70547/main.htm">http://websa

mples.syncfusion.com/samples/Tools.Windows//I70547/main.htm


Regards,
Pavan. K



Pavan Kumar K [Syncfusion]
Replied On December 18, 2007 08:49 AM

Hi Stephen,

Sorry for the broken link.


Please refer the sample and let me know if this helps.
http:/websamples.syncfusion.com/samples/Tools.Windows/I70547/main.htm


Regards,
Pavan. K


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.

;