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.

DockingManager caption button click event question

Thread ID:

Created:

Updated:

Platform:

Replies:

79723 Feb 23,2009 02:45 PM Mar 4,2009 11:51 PM Windows Forms 4
loading
Tags: Tools
Julie Levy
Asked On February 23, 2009 02:45 PM

Hi -
We have derived the DockingManager and use it to manage a left-docked control and a bottom-docked control on our pages. I have added a custom captionbutton at the derived class level. How can i tell in the caption button's click event which docked control the user was interacting with? There is nothing in the event args to tell which control or dockstyle triggered the event.

We are on syncfusion version 5.2.0.25.
Thanks,
Julie


Julie Levy
Replied On February 24, 2009 03:07 PM

Nevermind.. i realize that i need separate buttons for each control.


Administrator [Syncfusion]
Replied On February 25, 2009 12:12 AM

Hi Julie,

Thanks for the update.

You can also write code for each control in caption button's click event by checking whether particular docked control is focused as follows.

[C#]

// Different MessageBox will be displayed when pin button of docked controls are clicked.

void pin_captionbutton_Click(object sender, CancelEventArgs e)
{
if (this.listBox1.Focused)
{
MessageBox.Show("pin button clicked in listbox");
}

if (this.panel1.Focused)
{
MessageBox.Show("pin button clicked in panel");
}

}


Regards,
Jaya


Julie Levy
Replied On March 4, 2009 01:18 PM

Thanks for your response. The problem is that i want some handling for the click event in the derived control, not on every page in our product. I don't have a reference to the docked control which originated the event unless the event gives it to me.
But i figured out how to do it with two buttons which i need anyway.
Thanks,
Julie


Administrator [Syncfusion]
Replied On March 4, 2009 11:51 PM

Hi Julie,

Thanks for the update.

Please let me know if you have any questions.

Regards,
Jaya


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.

;