Print Page | Close Window

Constrained Docking Direction

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=7445
Printed Date: 31 January 2025 at 12:42pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Constrained Docking Direction
Posted By: apuhjee
Subject: Constrained Docking Direction
Date Posted: 25 June 2007 at 1:42pm

Does anyone know of a way to restrict a pane from docking to the top and bottom of the main frame... but still be able to dock anywhere on another docking pane??

In other words - I'd like to be able to stack docking panes, but only on the left and right sides of the main frame.
 
Cheers ~ jp



Replies:
Posted By: Oleg
Date Posted: 26 June 2007 at 1:56am
Hi,
in vb6 it looks like:
 
Private Sub DockingPaneManager_Action(ByVal Action As XtremeDockingPane.DockingPaneAction, ByVal Pane As XtremeDockingPane.IPane, ByVal Container As XtremeDockingPane.IPaneActionContainer, Cancel As Boolean)
    If Action = PaneActionDocking Then
        If Container.Container Is DockingPaneManager.Layout.TopContainer Or _
         Container.Container Is DockingPaneManager.Layout.ClientContainer Then
            If Container.Direction = DockBottomOf Or Container.Direction = DockTopOf Then Cancel = True
           
        End If
    End If
   
End Sub


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


Posted By: apuhjee
Date Posted: 26 June 2007 at 2:03pm
Thanks Oleg.  This was working for me also:
 

private void DockingPane_Action(object sender, AxXtremeDockingPane._DDockingPaneEvents_ActionEvent e)

{

    switch (e.action)

    {

        case DockingPaneAction.PaneActionDocking:

            if ((e.container.Direction == DockingDirection.DockTopOf || e.container.Direction == DockingDirection.DockBottomOf) &&

                (e.container.Container.Type == DockingPaneType.PaneTypeClient || e.container.Container.Type == DockingPaneType.PaneTypeSplitterContainer))

                e.cancel = true;

            break; 

    }

}

 


Posted By: Oleg
Date Posted: 26 June 2007 at 3:37pm

Yeap, also right. Thanks for sharing.



-------------
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