Print Page | Close Window

LoadStateFromString SaveStateFromString

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=9856
Printed Date: 28 June 2024 at 5:54am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: LoadStateFromString SaveStateFromString
Posted By: jpcoffeyXXX
Subject: LoadStateFromString SaveStateFromString
Date Posted: 11 March 2008 at 8:45am
Trouble loading state for the docking panes.  Based on the help file and some of the discussion I have read in the forums, I have been using the following,

   
Private Sub Form_Load()
    'Only needs to be called if setting the size in Form_Load
   
DockingPane1.RecalcLayout

    strPanes = RetrieveXMLLayoutPseudoCode()
    If Len(strPanes) > 0 Then
        'Load the docking pane
        DockingPane1.LoadStateFromString strPanes
    End If
End Sub



The panes layout nicely, however when I click on the contents of the panes they disappear!  Moreover, the contents of the panes are already in a PictureBox so I know that is not the problem.  I can literally query the value for visibility and the visible property will show up as False.  Yet, the controls are always supposed to be visible.  When I do not execute the LoadStateFromString command, the panes are rock solid.  I can double-click on the contents, resize the panes with the splitter, etc.  No problems whatsoever.  Does anyone have any suggestions on what I may be doing wrong?  Thank you very much for your feedback.

Sincerely,


John




Replies:
Posted By: Oleg
Date Posted: 12 March 2008 at 2:17am
Hi,
Too odd. Please upload sample to demonstrate.


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


Posted By: jpcoffeyXXX
Date Posted: 12 March 2008 at 3:11pm
Strange indeed.  It is so strange, I could not even reproduce the error for uploading.  I must have done something wrong. 


The panes are working perfectly with the code I provided in my initial problem statement.  I double-click them to make them disappear and they don't.  In any case, thanks for the timely response.

Sincerely,

John


Posted By: RonG
Date Posted: 07 August 2008 at 9:49am
I am having a similar problem actually. My forms all seem to be invisible as soon as I LoadStateFromString. I have uploaded a sample .NET app to demonstrate the issue. In the sample, move the panes, then hit "Save State". Move the panes again, then hit "Load State". In my environment, the forms in the panes are now not visible. Any thoughts?

http://www.sendspace.com/file/zur79z - http://www.sendspace.com/file/zur79z


Posted By: Oleg
Date Posted: 08 August 2008 at 6:35am
Hi,
You have attach panes in Attach event. See our samples.


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


Posted By: RonG
Date Posted: 08 August 2008 at 8:51am
Excellent - thanks.


Posted By: RonG
Date Posted: 08 August 2008 at 4:06pm
OK - new issue.  Correcting my error worked beautifully in my small sample project.  Now that I have implemented the fix in my production application, I have a new issue.  Although I can save values via the SaveStateToString and SaveState methods, neither the LoadStateFromString nor the LoadState methods appear to do anything.  I can verify that string and/or registry key is getting created, however, nothing changes when I run the corresponding Load method. 
 
Interestingly, the GetLayout and SetLayout methods work perfectly, but do not provide any way of saving the data.
 
Uploading my production app is not feasible, but I can copy the string that gets saved if that would be useful. 
 
Any thoughts?


Posted By: RonG
Date Posted: 11 August 2008 at 4:33pm
Got it sorted - I had a pane with an ID of 0.  I could not get it to load correctly until I changed the pane ID to 1.



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