I save and restore layout like:

  1. saving the layout In the UnloadingWorkbench(){} function of LayoutManager.cs :

     string s = SaveLayout();
    

    And then save the string "s" to the file "save.txt"

  2. restoring the layout In the Run(params object[] args){} of StartupCommands.cs :

    Read the file "save.txt" into string "blob", then

     layoutManager.Value.RestoreLayout(blob);
    

I can restore Pads and Documents that I opened before, but all of them dock to the "Right", I can't restore them on the before position. How do I modify my program, or where is the best position to put RestoreLayout() and SaveLayout() function?

Thanks!

asked 18 Jan '11, 22:00

lovablefish's gravatar image

lovablefish
56337
accept rate: 0%


Try calling RestoreLayout in an event handler for the layoutManager.Loaded event. The layout manager can't really do anything visual before that point.

link

answered 19 Jan '11, 07:37

Scott%20Whitlock's gravatar image

Scott Whitlock ♦♦
696262833
accept rate: 50%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2

Asked: 18 Jan '11, 22:00

Seen: 1,818 times

Last updated: 21 May '13, 22:59

powered by OSQA