Print Page | Close Window

Docking Pane LoadState

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=16502
Printed Date: 12 November 2024 at 11:29am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Docking Pane LoadState
Posted By: coolzsunil
Subject: Docking Pane LoadState
Date Posted: 24 March 2010 at 4:21am
Hi

For our application we would like to load the docking state selectively.
Presently we save the docking pane state to xml file by calling SaveStateToString.

In our application, panes are created on the fly.

Now with LoadStateFromString, all the panes that were in XML file get created and displayed. And the problem is that we would not have created the UI Control that would be handle to this pane.

What we would like is that suppose if the user chooses to display pane 1, we only show pane 1 and not the rest of the panes that were in XML file, and that at the correct state and position as was saved in XML.

How can we make this possible?
 
Docking Pane ActiveX 13.0
 



Replies:
Posted By: Aaron
Date Posted: 24 March 2010 at 2:31pm
Hi,
 
You could destroy not visible panes before calling SaveStateToString.
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: coolzsunil
Date Posted: 24 March 2010 at 3:31pm

Hi Aaron,

The panes are visible. So if I call destroy Panes before calling SaveStateToString, then the pane state of the panes will not be written to the XML file.
Then when the user runs the application again and when I call LoadStateFromString, how will I be able to recreate the pane at the exact position and state as was left by the user while closing the application.
 
Here our requirement is more specific.
 
If user creates 10 panes on the fly, we need to save the state using the XML option. But when the user restarts the application, we would like
to create and display panes only when the user selects any menu option to display them. Say for example, the XML has 10 entries for panes,
when the user selects Menu Option to display Pane1, we would like to display only Pane1 at the correct position and state as was saved in XML file.
 
But at the same time, i do not want the rest of the panes to be displayed.


Posted By: Aaron
Date Posted: 24 March 2010 at 4:59pm

Hi,

SaveStateToString will save the layout when closing app. Position and size will be saved, also visibility. So if user selects 1 & 2 and closes app next time pane 1 & 2 will be shown on same position.
 
Maybe I don't understand what you are trying to accomplish... Can you upload a test project to show what you mean?
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: coolzsunil
Date Posted: 24 March 2010 at 10:40pm
You are right that both the panes will be displayed at the same position.
 
But there is a slight change. When i call LoadStateFromString, it will load all the panes i.e. pane 1 and pane 2.
I do not want this.
 
What i want is that if the user selects Pane 1, I should be able to load only pane 1 at the correct position.
Pane 2 should not be visible, till the time user explicitly selects to load Pane2 using the menu option that we provide.
 
I hope this time it is clear.


Posted By: Aaron
Date Posted: 26 March 2010 at 5:11am
Hi,
 
I think, I understand what you are trying to accomplish... But I believe this isn't possible. You don't have control over the size of the panes once created because DockingPanes will resize the pane anyway. The positions of the panes isn't a problem and remains the same as last saved by SaveStateToString. Well, I created a little DEMO and you can experiment a little with it.
 
Good luck
 
https://forum.codejock.com/uploads/20100326_051056_DockingPanes.zip - uploads/20100326_051056_DockingPanes.zip
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



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