Posted 20 years ago by Bernd
Avatar
When I load a saved layout with LoadLayoutFromFile(),
the DWManager fires the "GetToolWindowChild" event for
all the tool windows saved in the layout file,
even for those that were hidden in the last session.
Therefore I create an instance of the child control
in the "GetToolWindowChild" event.

Is it possible to load the saved layout data,
but only to create those tool controls that are
active and the others on the fly as requested by the user
(without loosing the saved layout data of the hidden controls)?

Thanks
Bernhard

[ 08-18-2004: Message edited by: Bernd ]

Comments (5)

Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The code is looking for some Control to be returned. In the cases of the inactive tool windows you could just pass back a simple Label and then replace it later with your more complex child controls.


Actipro Software Support

Posted 20 years ago by Bernd
Avatar
Quote:
<font size="1" face="Verdana, Arial">quote:</font><HR>..pass back a simple Label and then replace it later with your more complex child controls.[/QB]<HR>


Ok, thanks. Not very elegant but simple work-around.

Bernhard
Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We're working on a major redesign of the docking controls right now. With the newer design, you won't have to deal with issues like this. It's a lot more straightforward.


Actipro Software Support

Posted 20 years ago by Bernd
Avatar
Your suggested work-around might be good in thoery, but
I cant figure out how to do it in practice
since the ToolWindow "Child" property is read-only.
So once the ToolWindow is created you cant
assign a different child control.
Posted 20 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Shoot... you're right. Sorry, I'm getting DockableWindow functionality confused with the redesign we're working on. The new ones allow you to swap out controls at any time.

For DockableWindow, you might have to keep the Label code so that it loads without an exception. It doesn't matter because you said it is hidden to begin with. Then maybe you should remove the tool window and create a new one with the control you want when you display the tool window.

We're really working hard to get a beta ready for the new docking controls. They have a ton of improvements over DockableWindow. All DockableWindow customers will be able to upgrade to the new design as if it was a new DockableWindow version.


Actipro Software Support

The latest build of this product (v2.0.0208) was released 19 years ago, which was after the last post in this thread.