Print Page | Close Window

Create Layout Dynamically

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=280
Printed Date: 28 April 2024 at 2:05am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Create Layout Dynamically
Posted By: thodgson
Subject: Create Layout Dynamically
Date Posted: 08 December 2003 at 2:42pm

Using the Pane Sample from the Xtreme Toolkit Pro 8.6, there are two layouts "editor" and "run".  As far as I can tell, these two layouts are pre-packaged and not created on the fly.

What's the best way to create layouts on the fly, instead of loading them from the registry or file.  I want to do it progromatically, but am running into some issues: If I load a layout, then call the DockPane method, I get an error.

Anyone have a good example of accomplishing this?

 

Thanks,

Tim




Replies:
Posted By: Oleg
Date Posted: 09 December 2003 at 1:39am

They are not predefined. 

Comment GetDockingPaneManager()->SetLayout(m_pEditorLayout); and you  will see it yourself.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: thodgson
Date Posted: 09 December 2003 at 6:18am

After some digging and experimenting, I now see how the layouts are done.  One has to create the layouts by moving the panes to the desired location, then save the current position as a layout.  Then, when the program is loaded a second time, the layouts can be loaded from the registry/file/xml and not created from scratch again.

I originally was creating the layouts on the fly each time the program was loaded, and I was trying to save the last layout.  When I reran the program, I could load the last layout, but the program crashed whenever I tried to move the panes around dynamically - with DockPane or Hide, etc.

Just wish there was some documentation on this  - explaining that that is the way it should be done - though I am thankful for the sample, since that is all I had to go on.

Tim




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net