Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Adding a pane to an unpinned group
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adding a pane to an unpinned group

 Post Reply Post Reply
Author
Message
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Topic: Adding a pane to an unpinned group
    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
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.141 seconds.