Posted 18 years ago by Kasper
Avatar
When should I call DockManager.LoadToolWindowLayoutFromFile() and BarManager.LoadBarLayoutFromFile()? Right now, I'm doing it in the mainform's OnLoad event, but when my application starts, toolbars and toolwindows flicker like crazy until the layouts are done loading. This is not very pretty, and I'm wondering if I can do the loading earlier on, to spare the user from watching all the elements being positioned? How is this usually done?

Kind regards

Kasper

Comments (3)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
How about doing it after the Form has been sized in the Form's constructor? It is not visible yet at that point.


Actipro Software Support

Posted 18 years ago by Kasper
Avatar
Hi,

The Form sizing thing is a .NET 1.1 thing, right? I'm using 2.0, but I guess it's after the InitializeComponent() call, right? :)

This seems to work for the toolbars, but if I try it with the toolwindows, I get 2 of each of them. Very strange, actually :|. Is this a known problem or..?
Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Any layout loading needs to be done after your form is sized. That means definitely after InitializeComponent and also after any form restoration code your app might implement (like storing the last form size in the registry).

You shouldn't be getting two sets of tool windows. It sounds like your tool window loading code must be getting hit twice somehow. You probably need to debug your app and see if that is happening.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.