Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - MDI Child with DockingPane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MDI Child with DockingPane

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


Joined: 31 March 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote helios456 Quote  Post ReplyReply Direct Link To This Post Topic: MDI Child with DockingPane
    Posted: 04 April 2006 at 1:46pm
I need to have a docking pane for my MDI application which I have now done, but when I try to create a second DockingPane for my MDIChild, the Panes don't display.  When I run the MDI client as it's own application there aren't any problems but as soon as I call it as an MDI child, it doesn't work anymore.  I'm using VS .NET with C# if that helps.  Any Suggestions?
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: 04 April 2006 at 2:19pm

For MDI child you must move all code from Designer to OnLoad:

 

this.DockingPaneManager = new AxXtremeDockingPane.AxDockingPane();

   this.DockingPaneManager.Location = new System.Drawing.Point(8, 32);
   this.DockingPaneManager.Name = "DockingPaneManager";
   this.DockingPaneManager.Size = new System.Drawing.Size(24, 24);
   this.DockingPaneManager.TabIndex = 2;
   this.DockingPaneManager.ResizeEvent += new System.EventHandler(this.DockingPaneManager_ResizeEvent);
   this.DockingPaneManager.AttachPaneEvent += new AxXtremeDockingPane._DDockingPaneEvents_AttachPaneEventHandl er(this.DockingPaneManager_AttachPaneEvent);
   this.DockingPaneManager.GetClientBordersWi dth += new AxXtremeDockingPane._DDockingPaneEvents_GetClientBordersWidt hEventHandler(this.DockingPaneManager_GetClientBordersWidth) ;
   this.DockingPaneManager.Action += new AxXtremeDockingPane._DDockingPaneEvents_ActionEventHandler(t his.DockingPaneManager_Action);

 

this.Controls.Add (DockingPaneManager);

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
helios456 View Drop Down
Newbie
Newbie


Joined: 31 March 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote helios456 Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2006 at 7:33pm
Works. Thanks.
Back to Top
Countryboy View Drop Down
Newbie
Newbie
Avatar

Joined: 05 April 2006
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Countryboy Quote  Post ReplyReply Direct Link To This Post Posted: 06 April 2006 at 9:00am

I'm having somewhat of the same type of problem in VB.Net.  I tried your fix and either I didn't implement it correctly or it doesn't fix my problem.  I have attached a sample of my project.  Any help you can provide would be greatly appreciated.

2006-04-06_085910_Sample_Frame.zip

Thanks

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: 06 April 2006 at 10:00am

Ok, lets try again:

The problem:

When you call frmPluginForm.MdiParent = MDIForm

.NET destroy frame and create again with WS_EX_MDICHILD style, so all commandbarrs and dockingpanes objects destroyed. Unfortunatelly from ActiveX code We can't catch this event end recreate them.

The solution

Solution is to create DockingPane and CommandBars after you call it

Sample

create InitBars method and call it after you change frame style:

 

Public Sub InitBars()

Me.AxDockingPane1 = New AxXtremeDockingPane.AxDockingPane

Me.AxCommandBars1 = New AxXtremeCommandBars.AxCommandBars

CType(Me.AxDockingPane1, System.ComponentModel.ISupportInitialize).BeginInit()

CType(Me.AxCommandBars1, System.ComponentModel.ISupportInitialize).BeginInit()

'

'AxDockingPane1

'

Me.AxDockingPane1.Enabled = True

Me.AxDockingPane1.Location = New System.Drawing.Point(24, 32)

Me.AxDockingPane1.Name = "AxDockingPane1"

Me.AxDockingPane1.Size = New System.Drawing.Size(17, 16)

Me.AxDockingPane1.TabIndex = 0

'

'AxCommandBars1

'

Me.AxCommandBars1.Enabled = True

Me.AxCommandBars1.Location = New System.Drawing.Point(8, 56)

Me.AxCommandBars1.Name = "AxCommandBars1"

Me.AxCommandBars1.Size = New System.Drawing.Size(24, 24)

Me.AxCommandBars1.TabIndex = 1

 

Me.Controls.Add(Me.AxCommandBars1)

Me.Controls.Add(Me.AxDockingPane1)

CType(Me.AxDockingPane1, System.ComponentModel.ISupportInitialize).EndInit()

CType(Me.AxCommandBars1, System.ComponentModel.ISupportInitialize).EndInit()

Dim paneA As Pane = AxDockingPane1.CreatePane(1, 200, 120, DockingDirection.DockLeftOf, Nothing)

paneA.Title = "Pane A"

Dim paneB As Pane = AxDockingPane1.CreatePane(2, 200, 120, DockingDirection.DockRightOf, paneA)

paneB.Title = "Pane B"

'AxDockingPane1.Options.HideClient = True

'AxDockingPane1.Options.ShowCaption = False

AxDockingPane1.Options.ThemedFloatingFrames = True

AxDockingPane1.Options.LunaColors = False

AxDockingPane1.SetCommandBars(Me.AxCommandBars1.GetDispatch)

AxCommandBars1.ActiveMenuBar.Controls.Add(XTPControlType.xtp ControlButton, 10, "File")

End Sub

 

Public Sub ShowPluginForm(ByVal MDIForm As System.Windows.Forms.Form) Implements FrameNET.Interface.IPlugin.ShowPluginForm

Try

frmPluginForm = New frmchild

frmPluginForm.MdiParent = MDIForm

frmPluginForm.Show()

frmPluginForm.InitBars()

Catch err As Exception

MsgBox("Error in ShowPlugin." & vbCrLf & err.Message & vbCrLf & err.Source, MsgBoxStyle.Critical, "Security Plugin")

End Try

End Sub

 

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.141 seconds.