MDI Child with DockingPane |
Post Reply |
Author | |
helios456
Newbie Joined: 31 March 2006 Status: Offline Points: 3 |
Post Options
Thanks(0)
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?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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.Controls.Add (DockingPaneManager); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
helios456
Newbie Joined: 31 March 2006 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Works. Thanks.
|
|
Countryboy
Newbie Joined: 05 April 2006 Location: United States Status: Offline Points: 1 |
Post Options
Thanks(0)
|
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 = FalseAxDockingPane1.Options.ThemedFloatingFrames = TrueAxDockingPane1.Options.LunaColors = FalseAxDockingPane1.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 TryfrmPluginForm = New frmchildfrmPluginForm.MdiParent = MDIForm frmPluginForm.Show() frmPluginForm.InitBars() Catch err As ExceptionMsgBox("Error in ShowPlugin." & vbCrLf & err.Message & vbCrLf & err.Source, MsgBoxStyle.Critical, "Security Plugin") End Try End Sub
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |