Print Page | Close Window

Adding a pane to an unpinned group

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=16884
Printed Date: 31 January 2025 at 4:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adding a pane to an unpinned group
Posted By: mrmathis
Subject: Adding a pane to an unpinned group
Date 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?
 
http://forum.codejock.com/uploads/20100626_090856_MainFrm.zip - uploads/20100626_090856_MainFrm.zip
 


-------------
--Mike



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net