Print Page | Close Window

Preserving pane order

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
Printed Date: 28 May 2023 at 11:59am
Software Version: Web Wiz Forums 12.04 -

Topic: Preserving pane order
Posted By: rdhd
Subject: Preserving pane order
Date Posted: 20 February 2009 at 4:16pm
I have a number of panes docked together in one or more docking pane containers. I need to "remove" some of the panes temporarily and restore them back later.
I am finding this a hard task to accomplish. I don't want save the layout and reload it since all the docking panes empty (and the background is drawn) and then come back. This is overkill. So what I found I can do is get all the panes that are displayed, and save their IDs in a stl vector using push_back. Then I save the IDs of the panes I don't close in another vector. Later to restore with a minimum of display issues I close those in the vector of panes I did not originally close. Then I call ShowPane on the vector I populated with all the panes that were originally displayed.
This works great and the order of the panes is the original order before all this happend.
However, if I reorder the display of the panes by mousing down over a "tab" and moving a pane, I am finding that when I call GetPaneList on the pane manager and then enumerate (GetHeadPosition, GetNext) the panes, the order the manager gives out the panes is NOT the order they are displayed in.
I don't see a way to determine an "order" by getting the layout or by using the tabbed container (I don't see any methods that would give me this info).
So ...
How can I get the panes in the order they are displayed in a tabbed container?
or even better, what do I need to do in order to close a pane and then open it so that it comes back exactly where it was before I closed it? Note I don't have to necessary "close" the pane. I just want it undisplayed so the user cannot interact with the contents (before moving to codejock we used a property sheet and simply disabled the tabs for the items we wanted to temporarily prevent the user from accessing).

Posted By: rdhd
Date Posted: 22 February 2009 at 7:36pm
I have figured out a way to get the order correct when recreating the panes. I have to go to each CXTPDockingPaneTabbedContainer and iterate the item panes. GetItemPane is indexed by the physical tab position so that bypasses the fact that the pane manager and layout objects all enumerate in the order panes were originally created.
So now I can modify the UI and restore it without panes moving relative to each other.

Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 -
Copyright ©2001-2021 Web Wiz Ltd. -