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

DockingPaneManager State

 Post Reply Post Reply
Author
Message Reverse Sort Order
Kavian View Drop Down
Newbie
Newbie
Avatar

Joined: 27 January 2012
Location: IRAN
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kavian Quote  Post ReplyReply Direct Link To This Post Topic: DockingPaneManager State
    Posted: 02 February 2012 at 8:07pm
Public Sub DockingPanes_Load(objdp As DockingPane)
    Dim px As PropExchange
    Set px = XtremeDockingPane.CreatePropExchange()
    px.CreateAsXML True, "DPSettings"
    If (px.LoadFromFile(App.Path & "dp.xml")) Then
        objdp.DestroyAll
        objdp.Layout.DoPropExchange px
    End If
    objdp.RecalcLayout
End Sub
 
Public Sub DockingPanes_Save(objdp As DockingPane)
    Dim px As PropExchange
    Set px = XtremeDockingPane.CreatePropExchange()
    px.CreateAsXML False, "DPSettings"
    objdp.Layout.DoPropExchange px
    px.SaveToFile App.Path & "dp.xml"
End Sub
Back to Top
martin.kelley View Drop Down
Newbie
Newbie


Joined: 24 July 2009
Location: United Kingdom
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote martin.kelley Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2009 at 5:37am
Hi. I am using v13 ActiveX from c#
I am trying to save the layout of the Panes on my form and restore them when the form is next loaded
In my FormClosed event I have
 
DockingPaneGlobalSettings glob = new DockingPaneGlobalSettings();
PropExchange pEx=glob.CreatePropExchange();
DockingPaneLayout myLayout=DockingPaneManager.CreateLayout();
DockingPaneManager.GetLayout(myLayout);
pEx.CreateAsXML(false, "MaintenanceItem");
myLayout.DoPropExchange(pEx);
pEx.SaveToFile(@"c:\Test.xml");
 
In my FormLoad event (at the very end) I have
DockingPaneGlobalSettings globSettings=new DockingPaneGlobalSettings();
PropExchange pEx = globSettings.CreatePropExchange();
DockingPaneLayout myLayout=DockingPaneManager.CreateLayout();
pEx.CreateAsXML(true,"MaintenanceItem");
if(pEx.LoadFromFile(@"c:\Test.xml"))
{
  myLayout.DoPropExchange(pEx);
  DockingPaneManager.SetLayout(myLayout);
}
 
The file is saved and seems to relect the state of the panes. But the state of the panes is not restored by the code I have in FormLoad
 
What am I missing?   The SaveStae and LoadState methods seem to have the same problem; a registry entry is made but
Loading it seems to have no effect on the Pane layout.
 
Thanks
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.188 seconds.