Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - How arrange docking panes in only 1 line?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How arrange docking panes in only 1 line?

 Post Reply Post Reply
Author
Message
kangcorn View Drop Down
Newbie
Newbie


Joined: 02 December 2005
Location: Korea, South
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote kangcorn Quote  Post ReplyReply Direct Link To This Post Topic: How arrange docking panes in only 1 line?
    Posted: 07 December 2005 at 4:21am

How do you arrange docking panes in only 1 line?

sorry.
I do not well English.

There is 5 docking panes.

condition 1:
All pane becomes docking on left side.

condition 2:
All pane must become docking all in 1 line.

How must you do if do with upside.

thank you.

** Xtreme Toolkit Pro 9.8


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 December 2005 at 5:33am

 

CXTPDockingPane1* pPane= m_paneManager.FindPane(ID_1),

m_paneManager.DockPane(pPane, xtpPamneDockLeft, NULL);

and for all other pane:

m_paneManager.DockPane(m_paneManager.FindPane(ID_2), xtpPaneDockTop, pPane);

m_paneManager.DockPane(m_paneManager.FindPane(ID_3), xtpPaneDockTop, pPane);

m_paneManager.DockPane(m_paneManager.FindPane(ID_4), xtpPaneDockTop, pPane);

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
kangcorn View Drop Down
Newbie
Newbie


Joined: 02 December 2005
Location: Korea, South
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote kangcorn Quote  Post ReplyReply Direct Link To This Post Posted: 07 December 2005 at 6:14pm

thank you. your reply.

That I wish is to limit docking by user.

When user does docking in floating state or drag and drop, it wants to become by one line.

Is there method?

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 December 2005 at 3:09am

I don't understand :(

You want to prevent docking to top/right/bottom? and allow only to dock to left?

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
kangcorn View Drop Down
Newbie
Newbie


Joined: 02 December 2005
Location: Korea, South
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote kangcorn Quote  Post ReplyReply Direct Link To This Post Posted: 08 December 2005 at 8:28pm

It sees and solved pane actions sample that dock only left. ^^~

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2005 at 6:19am

Hi,

Ok, I see now.  You can catch XTP_DPN_ACTIONevent in OnDockingPaneNotify handler and cancel soem actions:

 

 if (wParam == XTP_DPN_ACTION)
 {
  XTP_DOCKINGPANE_ACTION* pAction = (XTP_DOCKINGPANE_ACTION*)lParam;

  if (pAction->action == xtpPaneActionDocking && pAction->pDockContainer && pAction->pDockContainer->GetType() == xtpPaneTypeTabbedContainer)
  {
   if (((CXTPDockingPaneTabbedContainer*)pAction->pDockContaine r)->GetParentFrame() == this)
   {
    XTPDockingPaneDirection directionPane = m_paneManager.GetPaneDirection(pAction->pDockContainer);& nbsp;   

    if (((directionPane == xtpPaneDockBottom) || (directionPane == xtpPaneDockTop)) &&
     ((pAction->dockDirection == xtpPaneDockBottom) || (pAction->dockDirection == xtpPaneDockTop)))
    {
     pAction->bCancel = TRUE;
     return TRUE;
    }

    if (((directionPane == xtpPaneDockLeft) || (directionPane == xtpPaneDockRight)) &&
     ((pAction->dockDirection == xtpPaneDockLeft) || (pAction->dockDirection == xtpPaneDockRight)))
    {
     pAction->bCancel = TRUE;
     return TRUE;
    }
   }  
  }

  if (pAction->action == xtpPaneActionDocking && (pAction->pDockContainer == m_paneManager.GetTopPane() ||
   pAction->pDockContainer == m_paneManager.GetClientPane()))
  {
   POSITION pos = m_paneManager.GetPaneList().GetHeadPosition();
   while (pos)
   {
    CXTPDockingPane* pPane = m_paneManager.GetPaneList().GetNext(pos);
    if (!pPane->IsClosed() && !pPane->IsFloating() && pPane != pAction->pPane && pAction->dockDirection == m_paneManager.GetPaneDirection(pPane))
    {
     pAction->bCancel = TRUE;
     return TRUE;
    }
   }

  }

  
  return TRUE;
 }
 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
kangcorn View Drop Down
Newbie
Newbie


Joined: 02 December 2005
Location: Korea, South
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote kangcorn Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2005 at 1:45am

thanks oleg. ^^*

There is 1 problem.

Only 1 pane docks in docking pane's case that several pane has attached.

Remainder panes do not dock again in situation that 1 pane has docked.

I am sorry, but ask reply again.

Thank you.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2005 at 5:10am

Didn't you want it?

You asked to prevent dock to left if another panes was docked on left side...

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.125 seconds.