PDA

View Full Version : Docking Panel on a View



Mark D Eppley
6-Apr-2009, 06:13 PM
I am trying to get a docking panel to work on a view. I thought this was discussed at the training in New Orleans. I tricks to get this to work?

Peter Bragg
7-Apr-2009, 02:27 AM
Mark,

Here is what I did during the training. I took the Customer.vw source file - which is included in the training workspace - and simply commented out the Object oComments_TP (dbTabPage). Underneath the TabDialog object (oCustTD) I then added the following code:




Object oChildContainer is a dbContainer3d
Set Size to 100 100
Set Location to -1000 -1000
Set peAnchors to anAll
Set Visible_State to False

Object oCustomer_Comments is a cDbTextEdit
Entry_Item Customer.Comments
Set Size to 90 90
Set Location to 2 2
Set peAnchors to anAll
End_Object // oCustomer_Comments
End_Object

Object oDockingPaneManager is a cSigCjDockingManager
Set phoContainerObject to (Parent(Self))
Set pbPX_Save_Layout to False

Object oPane1 is a cSigCjDockingPane
Set phoClientObject to (oChildContainer(Self))
Set psTitle to "Comments"
Set peLocation to OLEDockRightOf
Set pbCloseable to False
Set pbDockable to False
Set pbFloatable to False
Set pbHideable to False
Set pbInitiallyHidden to True
End_Object

End_Object




This code creates a docking pane on the side of the view that contains the customer comments.

To key thing here is that we have a DockingPaneManager object inside the view, and we set the phoContainerObject property with the object id of the view (in this case we simply say 'Parent(Self)'). Once you have set this property, the act of adding panes is the same as if this were not in a view - you simply code your cSigCjDockingPane objects and associate them with what you want inside the docking pane by setting the phoClientObject property.

If you want I can send you the entire customer.vw file, but chances are you won't need it.

Hope this helps.

Ian Smith
7-Apr-2009, 06:29 AM
Hi Mark

Just to add to Peters’ explanation. The two important things are

1. A separate DockingManager inside the view
2. phoContainerObject must be set to the view object

When used in the client area the Docking Manager is linked to the Command Bars System. This ensures that the docking panes are resized and relocated as the Command Bars change.

When used in a view, setting phoContainerObject stops the new Docking Manager from being linked to the Command Bars and specifies that the View is the container. This ensures that the docking panes are resized and relocated as the view changes.

Mark D Eppley
7-Apr-2009, 10:13 AM
Thank you - I was missing the phoContainerObject