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

DockControlDeactivated event in DockingManager

Can I differentiate the event is pinned (pin click) or closed (button close click).

6 Replies

PS Prakash S Syncfusion Team September 16, 2002 02:47 PM

You can use the DockingManager.DockStateChanged and DockingManager.DockVisibilityChanged events to determine whether a control is being autohidden using the pushpin or closed through the 'X' button. The DockStateChanged event is fired whenever a control enters or exits the autohide mode. Querying for DockingManager.GetAutoHideMode() on the control should allow you to ascertain the autohide enter/exit state. The DockVisibilityChanged event, on the other hand, is fired only when the control is hidden/shown either by the DockingManager.SetDockVisibility() method or by clicking the Close button. Querying for the control's visibility state through the GetDockVisibility() method should allow you to determine whether the control is being hidden or shown. Prakash Syncfusion, Inc.


DR Dadang Rachmad September 17, 2002 07:34 AM

Thank you, what I need most is the DockVisibilityChanged I want to use the GetAutoHideMode but I want to get the control which name is "XXX" by iterating the DockingManager. It always failed in DockingManager1.Controls.Current. Whats wrong? dim controlName as string = "XXX" dim control as control DockingManager1.Controls.Reset() While DockingManager1.Controls.MoveNext control = DockingManager1.Controls.Current If control.Name = controlName Then Exit While End If End While


PS Prakash S Syncfusion Team September 17, 2002 10:08 AM

Hi, This seems like an implementation issue. You should not have any trouble accessing a docked control through it's Name property. Is it possible that the control may not have been dock-enabled? Please try to provide us with a sample that shows the problem. Thanks, Prakash Syncfusion, Inc.


DR Dadang Rachmad September 17, 2002 06:42 PM

Thanks the sample is in the mainform.vb but disable by remarks that I send for the topic "need to access textbox.text"


PS Prakash S Syncfusion Team September 19, 2002 11:19 AM

The problem was being caused by your code calling DockingManager.Controls several times; each call was returning a fresh instance of the collection's enumerator and consequently IEnumerator.Current was being accessed on a non-positioned instance. Modifying the code as shown below takes care of the problem, Dim enumerator As IEnumerator enumerator = Me.DockingManager1.Controls enumerator.Reset() While enumerator.MoveNext control = enumerator.Current If control.Name = "Identity" Then controlRet = control Exit While End If End While Prakash Syncfusion, Inc.


DR Dadang Rachmad September 20, 2002 02:57 AM

Thanks a lot. Best regards Dadang Rachmad

Loader.
Live Chat Icon For mobile
Up arrow icon