Search code examples
windowsdelphivcldelphi-6jedi

How to save current windows state using Delphi and JEDI Docking?


I'm using Delphi 6 and JEDI Docking visual components. I realise drag and drop between windows of my propgramm. I need to save current state of windows. For example, in first run I have separate one server window and two client windows, then I remove client windows into server window using DragandDrop. Then I close my programm and in second run I expect to see last state of windows (two client windows inside server window). How to realize this?


Solution

  • I have found solution. There are two methods for saving and loading windows state in JvDockControlForm module.

    SaveDockTreeToFile('MyFile');
    LoadDockTreeFromFile('MyFile');
    

    Also there are another ways to save state by components in JvPersistence tab. Anyway you need to put JvDockServer component from Jv Docking tab to your main form to use these methods above.