Print Page | Close Window

Moving Panes by code

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=843
Printed Date: 15 May 2024 at 4:54am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Moving Panes by code
Posted By: Maui
Subject: Moving Panes by code
Date Posted: 15 June 2004 at 5:56am

I have a few panes in my app and moving them all around can sometimes create some undesired results. I would like to create a default layout (or two) so that the user can click a menu item and restore some sort of default order/positioning.

Is there anyway to move panes to where you want them to be using code?

If i could somehow move them to where I want and then Savestate I could then reload them at any time using LoadState but I dont know how to move them predictably.

The only method I can see that places panes in a position is CreatePane. Do I need to keep destroying my panes and then recreating them just to move them about?

Any help appreciated.

Thanks




Replies:
Posted By: SuperMario
Date Posted: 17 June 2004 at 2:42pm
Yes, you could use the SaveStateToString method to save you layout to a file, you can create multiple predefined layouts this way.  Then you use the LoadStateFromString method to load the layouts.

What you need to do is run your application using only the SaveStateToString method and create your layout my draging the panes to the desired positions.  Once you have the layouts saved to a file, you simply call the LoadStateFromString method with the desired layout file.  

This method would move the panes in a predictable manner because you are moving them to the exact position had then in when you save the layout.



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