Print Page | Close Window

Limiting dockable area for two panes

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=11542
Printed Date: 12 November 2024 at 11:31am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Limiting dockable area for two panes
Posted By: MattT
Subject: Limiting dockable area for two panes
Date Posted: 22 July 2008 at 2:23pm
Good morning,
 
I'm working on a VB6 project that is currently using three different panes. Two of them are docked vertically on top of each other on the right side of the pane, and one is docked by itself on the left. The pane on the left is handled correctly in that it can float and only dock to the left, so I am not concerned about this one. We're trying to allow the users to float these panes, but I'm having some difficulty figuring out how to limit the two on the right in terms of where they are allowed to dock.
 
 
I have three different states to consider:
1-Both panes on the right are floating.
2-Only one pane is floating. The other is docked.
3-Both panes are docked.
 
The trouble comes in with the third scenario. If both of these panes are docked, they must be docked vertically on top of each other (as shown), and they must be on the right side of the application. Inside of the DockingPaneManager_Action event, I've used the Container.Direction property to limit the docking ability for the panes to dock on top, left, or bottom of the form. This allows these two panes to dock on the right but prevents them from docking vertically over each other (no docking top or bottom of).
 
I've got a simple structure down to determine which pane is being docked, but where I fall short is specifying exactly how to force either one of these panes to dock on top or on bottom of the other. I would appreciate any help that could be given.
 
-MDT



Replies:
Posted By: Aaron
Date Posted: 24 July 2008 at 1:54am
Hi,
 
Can you upload test project? Rip all code, just have necessary code with dockingpanes.
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: MattT
Date Posted: 24 July 2008 at 11:34am

Hello,

Certainly. uploads/20080724_113326_PaneSample.zip - Here you go.
 
During form load, I am able to attach the second pane underneath the first. If you were to click and drag either of the panes off, then the problem becomes reattaching the same way they came off. I appreciate your help in this matter.


Posted By: Aaron
Date Posted: 25 July 2008 at 5:17am
Hi,
 
I wasn't able to find a solution for only allowing to dock a pane but this will have the same effect, add the following code to dpManager_Action event
 
    If (Action = PaneActionDocked) Then
        Select Case Pane.Id
            Case RV_PANE_SERIES_GRID
                dpManager.DockPane Pane, 313, 120, DockBottomOf, dpManager.FindPane(RV_PANE_WELLZONE_GRID)
            Case RV_PANE_WELLZONE_GRID
                dpManager.DockPane Pane, 313, 120, DockBottomOf, dpManager.FindPane(RV_PANE_SERIES_GRID)
        End Select
    End If
 
Hope this will help you
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: MattT
Date Posted: 25 July 2008 at 2:12pm
Perfect, problem solved. Much appreciated!


Posted By: Aaron
Date Posted: 25 July 2008 at 2:34pm
Hi,
 
Glad to help a member in need
 
If your issue has been solved, can you please add SOLVED in your Topic description and have a look at post http://forum.codejock.com/forum_posts.asp?TID=11225 - http://forum.codejock.com/forum_posts.asp?TID=11225
 
Thanks


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



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