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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding hidden dockable controls

Thread ID:





27653 Apr 15,2005 10:32 AM UTC Apr 21,2005 08:58 PM UTC WinForms 6
Tags: Tools
Ian Yates
Asked On April 15, 2005 10:32 AM UTC

Hi. In my current project I would like to ''cache'' some dockable controls at startup without making them visible. While I have been able to use DockControl to add the control and then set the DockVisibility to false, the user can see the control being built before it becomes invisible, which is something I don''t want. Is there a way to add a control to the DockingManager (and preferably set the dock or float state) without making it visible to the user? I am currently extending the DockingManager and have tried some workarounds with overriding DockControl and InternalDockControl, but although I can get some of this functionality, the DockingManager becomes unstable. Perhaps there is a more simple workaround?

Administrator [Syncfusion]
Replied On April 15, 2005 06:53 PM UTC

Hi Ian, When are you trying to create these controls? I''ve found that if the controls are docked and then hidden in either constructor or the Form Load event handler that there''s no flicker. Regards, Gregory Austin Syncfusion Inc.

Ian Yates
Replied On April 18, 2005 09:40 AM UTC

I''m not sure we''re on the same lines here (that or I misunderstood your reply). If I create an instance of a control to be dockable and then use DockingManager.DockControl() to dock it, the user sees the control being created and it becomes visible. The next statement hides the control using DockingManager.SetDockVisibility() My goal is to create an instance of the dockable control and make it part of the DockingManager''s handled controls (and preferably already docked) without it ever being visible. Basically I''m looking for a way of calling DockControl but with the control''s DockVisibility being false and I explictly set it to true later.

Administrator [Syncfusion]
Replied On April 18, 2005 03:18 PM UTC

Hi Ian, I apologize for the confusion. By flicker, I was referring to your problem with the controls being temporarily visible. However, I have located a better solution than moving your initialization code to the contructor or Load event handler. Please refer to the LockDockPanelsUpdate() and UnlockDockPanelsUpdate() methods in DockingManager. Regards, Gregory Austin Syncfusion Inc.

Ian Yates
Replied On April 18, 2005 05:10 PM UTC

Thanks for your response. This is definitely the sort of method I was looking for, but it doesn''t appear to make any real difference to the outcome. I will try to create a sample project for you to see tomorrow so that you have a better idea of the problem and can try to think of some other solutions. Regards

Ian Yates
Replied On April 19, 2005 12:49 PM UTC

Hi again. I''ve added a basic example, but it is important for you to note that I haven''t been able to fully recreate the extent of the problem. Although the basic problem is there, the controls we are using are far more complex and are generally loading large amounts of data before being used. DockTest_45.zip On running the sample you should see a maximized MDI container with two menus. The first menu will load four controls (two visible, two hidden). This shows the first problem of the two hidden controls being briefly displayed before being made invisible. In our actual application, the effect is much greater. While writing this, I talked a colleague through the example I''ve attached and we actually managed to correct the issue I had with point two, which swaps the view from the first two controls to the second. I''m going to be working now on integrating these changes in to my main project to see if I can improve it; but I would appreciate you looking at the first problem. From what I can tell, the problem is really that the DockingManager leaves the control visible while it does the work with it.

Administrator [Syncfusion]
Replied On April 21, 2005 08:58 PM UTC

Hi Ian, I apologize for the delay in getting back to you. I''ve talked with several other engineers about your problem and I have some more information to share with you. First, I''ve talked with the Tech Support Engineer in charge of Docking. He''s aware of some limitations with LockWindowsUpdate and is working on improving it. Second, I''ve come up with a partial workaround. As far as I can tell, LockWindowsUpdate works correctly if you only intialize a single control with it. So if you can either avoid initalizing more than one control at a time or space out the initialization of multiple controls with a Timer, you should be able to avoid the flashing. Due to the load time of the Grids, this shouldn''t cause to much disruption to your application. Finally, I talked to a Grid engineer to make sure that this isn''t a Grid problem (which it isn''t). I don''t know if the algorithm you''re using to populate the Grid in the sample is the same as the one you''re using in your application, but, if it is, he suggested a few optimizations. You might want to make a post on the Grid Forum and ask about them. My only other thought is that you could create the controls and keep them hidden and undocked. You would then keep them undocked until you''re ready to show them. Thank you for your patience and your interest in Syncfusion products. Regards, Gregory Austin Syncfusion Inc.


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.

Warning Icon 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.Close Icon