Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - Limiting dockable area for two panes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Limiting dockable area for two panes

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


Joined: 22 July 2008
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote MattT Quote  Post ReplyReply Direct Link To This Post Topic: Limiting dockable area for two panes
    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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
MattT View Drop Down
Newbie
Newbie


Joined: 22 July 2008
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote MattT Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2008 at 11:34am

Hello,

Certainly. 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.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
MattT View Drop Down
Newbie
Newbie


Joined: 22 July 2008
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote MattT Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2008 at 2:12pm
Perfect, problem solved. Much appreciated!
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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
 
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....
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.156 seconds.