PSPrakash 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.
DRDadang RachmadSeptember 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
control = DockingManager1.Controls.Current
If control.Name = controlName Then
PSPrakash S Syncfusion Team September 17, 2002 10:08 AM
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.
DRDadang RachmadSeptember 17, 2002 06:42 PM
the sample is in the mainform.vb but disable by remarks that I send for the topic "need to access textbox.text"
PSPrakash 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
control = enumerator.Current
If control.Name = "Identity" Then
controlRet = control