Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Preserving pane order
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Preserving pane order

 Post Reply Post Reply
Author
Message Reverse Sort Order
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 865
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Preserving pane order
    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.
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 865
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post 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).
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

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

This page was generated in 0.156 seconds.