Print Page | Close Window

Attach form to client area

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


Topic: Attach form to client area
Posted By: idolpx
Subject: Attach form to client area
Date Posted: 24 February 2005 at 3:28am
How do you attach a form to the client area of a Docking Pane Manager?

I haven't found an example of how to do this.

I've also had problems with the Resize event of the Docking Pane Manger.  It doesn't seem to be firing.  Any ideas?

tia!




Replies:
Posted By: SuperMario
Date Posted: 24 February 2005 at 8:07am
The form can be attached in the Attach event (See DockingPane samples, this is none in both of them).  If you are using both docking panes and command bars, you can use the CommandBars_Resize event.


Posted By: gshawn
Date Posted: 24 February 2005 at 8:09am
The Resize event isn't firing for me either... Looks like this could be a "little problem." :)


Posted By: Oleg
Date Posted: 24 February 2005 at 8:26am

So you have CommandBars on the same form? If "yes" than it is designed.

must be CommandBars_Resize used.



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


Posted By: gshawn
Date Posted: 24 February 2005 at 9:05am
That's right I had forgotten about this. The Resize event fires properly when I remove the CommandBars.Thanks for clarifying!


Posted By: idolpx
Date Posted: 24 February 2005 at 11:02am

Originally posted by SuperMario SuperMario wrote:

The form can be attached in the Attach event (See DockingPane samples, this is none in both of them).  If you are using both docking panes and command bars, you can use the CommandBars_Resize event.

I'll look in the samples.  Do you recall what sample project showed an example of this?

I am using CommandBars with the Docking Pane Manager. I will switch to using the CommandBars_Resize event.

Thanks to all for your feedback.

 



Posted By: ianp
Date Posted: 24 February 2005 at 11:09am

Both the DockingPanes samples (SDI and MDI) contains similar code in frmMain for the DockingPaneManager_AttachPane event.


Private Sub DockingPaneManager_AttachPane(ByVal Item As XtremeDockingPane.IPane)
'If Form not create yet.
    If arrPanes(Item.Id) Is Nothing Then
        Set arrPanes(Item.Id) = New frmPane
        arrPanes(Item.Id).BackColor = arrColor(Item.Id)
    End If
       
' Attach Form to Pane
    Item.Handle = arrPanes(Item.Id).hwnd
   
End Sub

Basically, create your dockingpanes in the form_load event. Once a pane is about to be displayed, the DockingPaneManager_AttachPane event is fired. Set the Item.Handle to the hWnd of the form/control which you wish to appear inside the docking pane



Posted By: idolpx
Date Posted: 24 February 2005 at 11:40am

What you're describing is how to attach a form to a Docking Pane.

I know how to do that.  I want to attach a form to the Client Area of the Docking Pane Manager.

I still haven't found an example for doing this.  Any ideas?

Thanks for the reply though.



Posted By: SuperMario
Date Posted: 24 February 2005 at 11:43am
Can you maybe post a pictuer as to what you are trying to do?  What are calling the Client Area of the Docking Pane Manager?



Posted By: idolpx
Date Posted: 24 February 2005 at 11:55am


Posted By: idolpx
Date Posted: 24 February 2005 at 11:56am

Sorry so big... I should have shrunk it down some.

The client area is the space around which a docking pane can dock.

I want to dock a form there based on the users selections and the mode of the application.

This will allow me to program all of the functionality of the different pieces of my app in different forms.



Posted By: SuperMario
Date Posted: 24 February 2005 at 11:59am
You don't attach a form to this area, the client area is the same form that you dragged the docking pane manager on.  See SDI Sample


Posted By: SuperMario
Date Posted: 24 February 2005 at 12:00pm
In the SDI Sample it shows how to hide the client area if thats what you want to know.  Then you can put a pane there instead.


Posted By: idolpx
Date Posted: 24 February 2005 at 12:44pm

That's a good idea. I'll try that. That pane will have to not allow grouping of other panes and I will need to remove it's title.

It would be nice to be able to just do somthing like

DockingPaneManager.ClientArea.Handle = MyForm.hWnd

I used to use ActiveBar2 and that's kindof how it worked.

 




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