Print Page | Close Window

Problem adding new panes

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=5626
Printed Date: 29 April 2024 at 5:43am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem adding new panes
Posted By: simus
Subject: Problem adding new panes
Date Posted: 28 November 2006 at 11:18am
Hi,
 
I have an application already running with several panes.
The user is able to load/save placement from files and the application also save the placement each time it is closed.
 
That's OK.
 
Now I have to add 7 more panes to the existing application. So I want to use the already existing placement for old panes and define default placement for new added panes.
 
In the code, I took a pane already existing in previous version and make the new pane to the reference one:
    - paneMgr.AttachPane(newPane, oldPane)
 
And there I have a problem.
If the reference pane is docked (for me on the right), when everything is docked I see that the panes are well attached (the panes are unioned one to the other)
 
If then I try to undock the pane (_ToggleDocking) the pane, the panes are not well attached to the reference one, all the panes are drawn one next to the others. and so I have the 7 panes that take the whole screen.
 
I looked a little bit inside the code and I saw a difference for the Holder of the panes, the new panes have an Holder (return by _GetHolder) that is different from the Holder retrieve for the previous existing panes.
 
Does anyone have an idea on how I can solve that. Thanks!
 
 
 



Replies:
Posted By: Oleg
Date Posted: 28 November 2006 at 1:17pm
Hello,
 
You can set these holders manually if you wish.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: simus
Date Posted: 29 November 2006 at 2:44am

Is there a property for that, or do i need to subclass DockingPane to make it public?

Thanks


Posted By: Oleg
Date Posted: 29 November 2006 at 6:23am
Hi,
 
Loop panes and set values for XTP_DOCKINGPANE_INFO structure
 
POSITION pos = dp.GetPaneList().GetHeadPosition();
 while (pos)
 {
  XTP_DOCKINGPANE_INFO& info = dp.GetPaneList().GetNext(pos);
  if (info.pPane == pPane)
     info.pFloatingHolder = ..
 }


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: simus
Date Posted: 29 November 2006 at 8:37am

Many, many thanks

it works




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