LoadStateFromString SaveStateFromString |
Post Reply |
Author | |
jpcoffeyXXX
Groupie Joined: 16 August 2005 Location: United States Status: Offline Points: 31 |
Post Options
Thanks(0)
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Too odd. Please upload sample to demonstrate.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jpcoffeyXXX
Groupie Joined: 16 August 2005 Location: United States Status: Offline Points: 31 |
Post Options
Thanks(0)
|
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 |
|
RonG
Newbie Joined: 07 August 2008 Location: United States Status: Offline Points: 6 |
Post Options
Thanks(0)
|
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You have attach panes in Attach event. See our samples.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
RonG
Newbie Joined: 07 August 2008 Location: United States Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Excellent - thanks.
|
|
RonG
Newbie Joined: 07 August 2008 Location: United States Status: Offline Points: 6 |
Post Options
Thanks(0)
|
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?
|
|
RonG
Newbie Joined: 07 August 2008 Location: United States Status: Offline Points: 6 |
Post Options
Thanks(0)
|
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.
|
|
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 |