Adding a pane to an unpinned group |
Post Reply |
Author | |
mrmathis
Senior Member Joined: 17 May 2007 Location: United States Status: Offline Points: 105 |
Post Options
Thanks(0)
Posted: 26 June 2010 at 9:25am |
I have a default set of panes that I create as my application initializes, and I set their state to be unpinned. Later, I may want to add other panes to that same group. I do that by creating the new panes and attaching them to one of the original panes. Doing so adds them in the unpinned state, which is good. However, if my user unpins that pane, it shows up alone in one docked container, and all the original panes show up beside it in another docked container. It seems the attach call didn't make the new pane an equal citizen with the original panes.
I've attached a modified source file from the docking pane sample to illustrate my problem. In MainFrm.cpp/CMainFrame::OnCreate, I've removed the original call to create pane 10, along with the subsequent call that docked it to the side, and instead deferred the creation a bit and attached it to pane 7 after pane 7 has been hidden.
...
//CXTPDockingPane* pwndPane10 = m_paneManager.CreatePane(
// IDR_PANE10, CRect(0, 0,200, 120), xtpPaneDockBottom, pwndPane9); ... m_paneManager.HidePane(pwndPane7);
CXTPDockingPane* pwndPane10 = m_paneManager.CreatePane(IDR_PANE10, CRect(0, 0,200, 120), xtpPaneDockLeft, pwndPane7);
m_paneManager.AttachPane(pwndPane10, pwndPane7); //CXTPDockingPaneSidePanel* pPanel = m_paneManager.DockSidePane(pwndPane10, xtpPaneDockRight, CRect(0, 100, 120, 300)); //pPanel->Collapse(); The "neighbor" arg to CreatePane doesn't seem to matter. I've tried the call as shown, as well as with NULL for that arg, with no change in behavior.
Is there any way to get the new pane to behave as if it had been added before the HidePane call?
|
|
--Mike
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |