Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - Docking Pane LoadState
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Docking Pane LoadState

 Post Reply Post Reply
Author
Message
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post Topic: Docking Pane LoadState
    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
 
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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
 
 
 
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....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.281 seconds.