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

LoadStateFromString SaveStateFromString

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


Joined: 16 August 2005
Location: United States
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpcoffeyXXX Quote  Post ReplyReply Direct Link To This Post Topic: LoadStateFromString SaveStateFromString
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 March 2008 at 2:17am
Hi,
Too odd. Please upload sample to demonstrate.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jpcoffeyXXX View Drop Down
Groupie
Groupie


Joined: 16 August 2005
Location: United States
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpcoffeyXXX Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
RonG View Drop Down
Newbie
Newbie


Joined: 07 August 2008
Location: United States
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote RonG Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2008 at 6:35am
Hi,
You have attach panes in Attach event. See our samples.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
RonG View Drop Down
Newbie
Newbie


Joined: 07 August 2008
Location: United States
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote RonG Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2008 at 8:51am
Excellent - thanks.
Back to Top
RonG View Drop Down
Newbie
Newbie


Joined: 07 August 2008
Location: United States
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote RonG Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
RonG View Drop Down
Newbie
Newbie


Joined: 07 August 2008
Location: United States
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote RonG Quote  Post ReplyReply Direct Link To This Post 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.
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.141 seconds.