Print Page | Close Window

create pane in same spot it was destroyed

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=741
Printed Date: 11 December 2024 at 6:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: create pane in same spot it was destroyed
Posted By: Ark42
Subject: create pane in same spot it was destroyed
Date Posted: 16 May 2004 at 6:49pm

How can you tell if a pane is docked with a neighbor or not? For a single pane, I can get the dock direction, window rect, float/hidden/docked status and put the pane back in the same spot it was destroyed if I save all this information, but with two panes, it does not work since you can dock panes with neighbors. For example, if I have a two panes side by side at the bottom of the window, destroy and recreate one of them, it will appear either above/below the existing pane or completely on the left/right side of the window, not left/right side by side of the existing pane at the bottom, unless I manually specify the proper neighbor pane when creating the new pane.  But I do not see a function to retrieve what the neighbor pane is or how to do this?




Replies:
Posted By: brianh
Date Posted: 17 May 2004 at 3:40am

Hi,

I'm sorry I don't have an answer to your question but I was hoping you could help me.   I'm trying to find the first pane that's docked to the bottom of the frame, I can enumerate the panes and find the ones that are docked but I can't see how to get the dock direction.  In your question you mention that you can find this, can you tell me how?

Thanks.



Posted By: Ark42
Date Posted: 17 May 2004 at 11:58am

XTPWM_DOCKINGPANE_NOTIFY ... XTP_DPN_ACTION ... XTP_DOCKINGPANE_ACTION *pAction = (XTP_DOCKINGPANE_ACTION *)lParam; CXTPDockingPane *pPane = pAction->pPane; ... switch( pPane->GetID() ) ... case IDR_YOURPANE: ...  switch( pAction->action ) ... case xtpPaneActionDocking: ... m_yourpaneDockSide = pAction->dockDirection;




Posted By: brianh
Date Posted: 18 May 2004 at 3:38am

I had already found the 'action' callback and the dockDirection member but my problem is that when I want to add a new pane I have to go through the pane list and identify, for each pane, where it is currently docked, so I don't have an XTP_DOCKINGPANE_ACTION  object.

I suspect that the dockDirection member is only valid when actually docking a pane (I know for some other actions it just defaults to 'left'), so I guess I could add a map to associate each pane to a dockDirection and maintain it in the 'action' callbacks but it just seems like a lot of work.  I would have thought there would be a way to get the dock direction from the pane object itself but I can't see it if there is.

Thanks for your help, and sorry to have gone off topic.




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