Posted 13 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
Hi,
In my program, I have some ToolWindows in the document area and some DocumentWindows in the document window. I have a button that resets the tool window (which calls "LoadToolWindowLayoutFromFile"). After the tool windows get reloaded the order of the document and tool windows is different. For example the document area might be like this before the reset:
tool1, tool2, doc1, doc2
will be like this after the reset:
doc1, doc2, tool1, tool2

Any idea how to fix this?

thanks,
Jake

Comments (9)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jake,

Here's the problem... tool windows and document windows have different life cycles. So there might be 10 documents active when you save your layout and maybe none or 20 when you load it later on. So we really have no idea where the tool window fits into the currently-loaded documents when we load the layout. We only know which tab group it was in.

If you have any suggestions then feel free to reply but I'm not sure what we could do.

[Modified at 06/30/2006 10:48 AM]


Actipro Software Support

Posted 13 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
That seems reasonable. Is there a way to shuffle the order of the ActiveDocuments array? Then I could apply my own logic to maintain the order of the document area.

-Thanks.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Unfortunately no, right now there are methods to move a window between tab groups but not within the same tab group.


Actipro Software Support

Posted 13 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
So could there be some functionality like this in the future or is there some kind of work around that I can use now?
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
There isn't really a work around to do it right now short of hiding windows and then readding them in order. Would some sort of Move method (named better) on TabbedMdiWindow work for you if we let you indicate the index within the current tab group that you'd like to move the window to?


Actipro Software Support

Posted 13 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
That would be great, thanks.
Posted 11 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
Did you ever implement this feature? If so where do I find the method?
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes there are several methods on TabbedMdiWindow like MoveToPositionInTabbedMdiContainer which would probably be what you want.


Actipro Software Support

Posted 11 years ago by Jake Pearson - Software Developer, Alion Science and Technology
Avatar
That did the trick. Thanks!
The latest build of this product (v2020.1 build 0400) was released 3 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.