Print Page | Close Window

How arrange docking panes in only 1 line?

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=3365
Printed Date: 21 September 2024 at 1:30am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How arrange docking panes in only 1 line?
Posted By: kangcorn
Subject: How arrange docking panes in only 1 line?
Date 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





Replies:
Posted By: Oleg
Date 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


Posted By: kangcorn
Date 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?

 



Posted By: Oleg
Date 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


Posted By: kangcorn
Date Posted: 08 December 2005 at 8:28pm

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



Posted By: Oleg
Date 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


Posted By: kangcorn
Date 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.



Posted By: Oleg
Date 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



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