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.

Event when closing gradientPanel

Thread ID:

Created:

Updated:

Platform:

Replies:

13815 May 11,2004 12:35 PM May 13,2004 06:34 AM Windows Forms 3
loading
Tags: Tools
Pascal Tellier
Asked On May 11, 2004 12:35 PM

What is the best way to get notified when the user closes a gradient panel that is docked? Thanks Pascal

Administrator [Syncfusion]
Replied On May 11, 2004 04:55 PM

Hi Pascal, You could handle the DockingManager''s DockVisibility changed event (as shown below) for this purpose : private void dockingManager1_DockVisibilityChanged(object sender, Syncfusion.Windows.Forms.Tools.DockVisibilityChangedEventArgs arg) { if (arg.Control == this.gradientPanel1) { if (this.dockingManager1.GetDockVisibility(this.gradientPanel1)== false) MessageBox.Show("GradientPanel Closed"); } } Note that the docking window is actually hidden when the "X" button is clicked and not terminated. Let me know if this works for you. Thanks for considering Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Pascal Tellier
Replied On May 13, 2004 04:31 AM

Thank you for the information. Here is what I am trying to achieve. I have a class that extends GradientPanel. I want this class to raise a closed event when the user clicks on the X. Is it possible to get a reference to the docking manager from the gradient panel? Thanks Pascal >Hi Pascal, > >You could handle the DockingManager''s DockVisibility changed event (as shown below) for this purpose : > >private void dockingManager1_DockVisibilityChanged(object sender, Syncfusion.Windows.Forms.Tools.DockVisibilityChangedEventArgs arg) > { > if (arg.Control == this.gradientPanel1) > { > if (this.dockingManager1.GetDockVisibility(this.gradientPanel1)== false) > MessageBox.Show("GradientPanel Closed"); > } > } > >Note that the docking window is actually hidden when the "X" button is clicked and not terminated. Let me know if this works for you. Thanks for considering Syncfusion products. > >Regards, >Guru Patwal >Syncfusion, Inc.

Administrator [Syncfusion]
Replied On May 13, 2004 06:34 AM

Hi Pascal, I am afraid, it is not possible to reference the DockingManager from within the derived GradientPanel (or any dockable control), and this approach is not recommended as well. The best way to gao about this would be to handle the DockingManager''s DockVisibilityChanged method, check for the control that has been closed, and then do the necessary task. Please let me know if you need additional information. Regards, Guru Patwal Syncfusion, Inc.

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.

;