Docking Pane LoadState |
Post Reply |
Author | |
coolzsunil
Groupie Joined: 18 March 2009 Status: Offline Points: 28 |
Post Options
Thanks(0)
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
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
coolzsunil
Groupie Joined: 18 March 2009 Status: Offline Points: 28 |
Post Options
Thanks(0)
|
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.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
coolzsunil
Groupie Joined: 18 March 2009 Status: Offline Points: 28 |
Post Options
Thanks(0)
|
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.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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
|
|
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.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |