When I launch a pad for the first time, it's always docked to the right. Can I set the default startup location for a Pad, assuming the user has never launched it before?

asked 19 Oct '10, 19:24

Scott%20Whitlock's gravatar image

Scott Whitlock ♦♦
696262833
accept rate: 50%

edited 27 Nov '10, 14:50


You can't do this right now, but I do intend to add this as a feature. For now there is a workaround:

  • Run your application
  • Open all your Pads at least once
  • Arrange them where you want them to open by default
  • Somehow call LayoutManager.SaveLayout, get the blob it returns, and automatically load that when your user loads a "New" project/solution/whatever
link

answered 19 Oct '10, 19:27

Scott%20Whitlock's gravatar image

Scott Whitlock ♦♦
696262833
accept rate: 50%

I've got the SaveLayout being called and have saved the "blob", but how do I now Load that blob? ShowPad() takes an IPad not a string which SaveLayout returned.

link

answered 09 Mar '11, 19:45

Shaggy13spe's gravatar image

Shaggy13spe
1
accept rate: 0%

Ok, I figured out that I needed to use LayoutManager.RestoreLayout(). But I need my Pad to show on the left side during startup for the first time. I thought that in my StartupCommand, loading the blob, would work, but it still positions it over to the right. Calling it from a toolbar, does however put it on the left where I want it, but obviously can't have my users doing that everytime. Any clue as to when you will have this feature implemented?

(09 Mar '11, 19:56) Shaggy13spe

Try hooking into the Loaded event on your LayoutManager. That's the appropriate time to call RestoreLayout (or at least the earliest time you can call it). The problem is that the layout manager hasn't loaded when the startup commands are being processed.

(09 Mar '11, 20:08) Scott Whitlock ♦♦

Ah thanks, will try that. This is an awesome job you've done here, but I'm trying to get my head wrapped around it all.

(09 Mar '11, 20:19) Shaggy13spe
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:

×17
×7
×3
×2
×1
×1

Asked: 19 Oct '10, 19:24

Seen: 2,370 times

Last updated: 09 Mar '11, 20:19

powered by OSQA