create pane in same spot it was destroyed |
Post Reply |
Author | |
Ark42
Senior Member Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
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? |
|
brianh
Groupie Joined: 30 April 2004 Location: United Kingdom Status: Offline Points: 83 |
Post Options
Thanks(0)
|
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. Edited by brianh |
|
Ark42
Senior Member Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
|
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; |
|
brianh
Groupie Joined: 30 April 2004 Location: United Kingdom Status: Offline Points: 83 |
Post Options
Thanks(0)
|
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. |
|
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 |