Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - Attach form to client area
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Attach form to client area

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


Joined: 24 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote idolpx Quote  Post ReplyReply Direct Link To This Post Topic: Attach form to client area
    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!

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Posted: 24 February 2005 at 8:09am
The Resize event isn't firing for me either... Looks like this could be a "little problem." :)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
idolpx View Drop Down
Newbie
Newbie


Joined: 24 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote idolpx Quote  Post ReplyReply Direct Link To This Post 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.

 



Edited by idolpx
Back to Top
ianp View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 19 December 2003
Location: United Kingdom
Status: Offline
Points: 119
Post Options Post Options   Thanks (0) Thanks(0)   Quote ianp Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
idolpx View Drop Down
Newbie
Newbie


Joined: 24 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote idolpx Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
idolpx View Drop Down
Newbie
Newbie


Joined: 24 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote idolpx Quote  Post ReplyReply Direct Link To This Post Posted: 24 February 2005 at 11:55am
Back to Top
idolpx View Drop Down
Newbie
Newbie


Joined: 24 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote idolpx Quote  Post ReplyReply Direct Link To This Post 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.



Edited by idolpx
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
idolpx View Drop Down
Newbie
Newbie


Joined: 24 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote idolpx Quote  Post ReplyReply Direct Link To This Post 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.

 



Edited by idolpx
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.