Print Page | Close Window

LoadStateFromString problem.

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=12614
Printed Date: 31 January 2025 at 3:50am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: LoadStateFromString problem.
Posted By: slvrbllt
Subject: LoadStateFromString problem.
Date Posted: 05 November 2008 at 10:27am

Hello,

Here is my scenario:

A default layout string is saved into the application's resources.
When the application starts I get the string into a variable and call the following line:

DockingPane.LoadStateFromString sTmp

then I call:
 
DockingPane.LoadState "MySettings", App.Title, "MainWindow"
 
so that the user saved state takes over the default layout. Everything worked fine until my customer asked for a menu option as to restore the default layout. Here is where the problem occurs!
 
Calling LoadStateFromString again would NOT change the layout, while LoadState DOES,  obviously reverting the layout to the last saved.
 
Please note that I use AttachPane for populating my docking manager and all my panes have an ID > 0.
 
Any help, please ?



Replies:
Posted By: Oleg
Date Posted: 06 November 2008 at 1:52am
Hi,
Actually it shold work.
 
Here sample that I tried that works for me:
 
 
Dim s  As String
Private Sub Command1_Click()
DockingPane.LoadStateFromString s
End Sub
Private Sub Form_Load()
DockingPane.CreatePane 1, 100, 100, DockLeftOf
s = DockingPane.SaveStateToString
End Sub


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



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