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

Can I disable hide within dockingmanager

When I create controls/forms and add them to the docking manager, I have the ability to allow docking, allow floating, etc. Can I disable the ability of a user to hide a control/form. I understand there is the ability to call SetCloseButtonVisibility, and this removes Hide as one of the choices. But for the docked forms in the application I would like the user to be able to close them, but not hide them. Thanks, Vikram.

7 Replies

AD Administrator Syncfusion Team January 30, 2004 05:14 PM UTC

Hi Vikram, According to my understanding you wish to close the docking window when its "X" close button is pressed and not just hide it. You could do so by handling the DockingManager''s DockVisibility method as shown in the code below : private void dockingManager1_DockVisibilityChanged(object sender, Syncfusion.Windows.Forms.Tools.DockVisibilityChangedEventArgs arg) { this.dockingManager1.SetEnableDocking(arg.Control, false); this.Controls.Remove(arg.Control); arg.Control.Dispose(); } You should first remove the docked control from the DockingManager''s Controls list, and then from the Form''s Controls list. And finally you should call the Dispose emthod on that control. I have created a sample_application here which illustrates how to do this. The main menu has options to save/load state information. Save the state informtaion, close the docking windows, and try to load them. Nothing comes up. This is because the docking windows were destroyed when "closed" and not hidden. Please let me know if I have not understood your requirements correctly. Thanks for considering Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


DM Desis Machino January 30, 2004 06:35 PM UTC

Actually, this is functionality I need: If the user closes the docked window via the X, I want to remove the docked control from my application, and I know how to do this. However, I do not want the user to be able to hide the docked control, because I cannot tell when a control has been closed or hidden. From what I understand, either closing or hiding a docked control will set the DockVisibility to false. How do I know if the user has closed as opposed to hiding the control and vice versa? Is there a way for me to tell? If not, then, rather then confuse my users, I would like to remove the hide option from the list of options (Docked, Hide, Floating).


AD Administrator Syncfusion Team February 1, 2004 06:11 PM UTC

Hi Vikram, You could loop through the list of controls associated with the DockingManager as shown in the KB article below : How do I access the collection of dock-enabled controls? I have also modified my previous sample accordingly. Now I have placed a "Docked Controls" button which will display the list of docked controls when clicked. When the control was previously hidden when "X" button was clicked, the controls would still be listed among the docked controls. Now when you actually dispose the controls when "X" button is clicked, the controls do not show up in the docked controls list. With this check you could accurately tell whether a control is hidden or closed. Please refer to the sample_attached and let me know if you need any additional information. Regards, Guru Patwal Syncfusion, Inc.


DM Desis Machino February 2, 2004 03:53 PM UTC

I ran your example, and when I clicked on close (X), the panel was removed from the list of docked controls as you indicated. Also, when I clicked on hide, the panel was removed from the list of docked controls. What I am asking is this. Is there a difference between closing the panel via the X at the top right of the panel, and selecting Hide. It seems that both do the same thing. I find that confusing because, I expect the close to remove the panel from the list of docked controls. But the hide should simply hide the panel, and not remove it from the dockingmanager list. This is what my users of the application will expect. If there is not a difference, then rather then confuse my users, I would like to disable the ability for the user to hide the panel. Is this possible?


AD Administrator Syncfusion Team February 2, 2004 04:11 PM UTC

Hi Vikram, I have created a DirectTrac incident 9035 in this regard, and will update you there from now on. In future, please address all your technical support related queries through DirectTrac as far as possible. Thanks for your cooperation. Regards, Guru Patwal Syncfusion, Inc.


DM Desis Machino February 2, 2004 04:58 PM UTC

Thanks, Could you tell me how I can access this Direct-Trac open issue (I cannot seem to find a way to view an open issue by ID number).


AD Administrator Syncfusion Team February 2, 2004 06:51 PM UTC

Hi Vikram, Log into Direct Trac from the link below : http://www.syncfusion.com/Support/DirectTrac/user/default.aspx Click on the ''View/Update incidents'' button and all your incidents would be displayed Please try this and let me know if you need any assistance. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon