Print Page | Close Window

DockingPane in MDI Child Form :NET Dessapear

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=21713
Printed Date: 27 April 2024 at 12:06am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DockingPane in MDI Child Form :NET Dessapear
Posted By: charlitos2
Subject: DockingPane in MDI Child Form :NET Dessapear
Date Posted: 18 June 2013 at 1:10am
Hello friends,

I just do an aplicattion with MDI child forms, and I follow the instrucctions about create panel inside a MDI child form, but, when I run and try to move any panel, this dissapear, or qhe I create a nwe MDI child Form, last one content panel dissapear.

Please  help me to solution this problem, because I try in the new released version 16.2 and the problem is same.

PD. This problem is when Main Form content a CommadBar control

I jus used VB.NET 2010
Test in CJ Activex 15.3.1 and 16.2
Windows 7



Replies:
Posted By: SuperMario
Date Posted: 18 June 2013 at 8:53am
Could you upload a small sample shell which shows the layout?  Or possibly a picture describing it?  Do you use aligned controls in the MDI form?


Posted By: charlitos2
Date Posted: 18 June 2013 at 11:20am
Hi friend, 

Yes i got a new sample with this trouble, the details inside the form1.vb

is anything I doit wrong??

uploads/3886/Test1.rar" rel="nofollow - uploads/3886/Test1.rar



Posted By: Xander75
Date Posted: 16 August 2013 at 3:39am
Hi,

I have the same issue in C#.Net within a Child Form. I noticed that all appears to be fine with the DockingPane object when the form is opened, however when I open another form and go back to the first form with the docking panes the Action event no longer seems to work! It seems as though the Action event has disconnected itself.

Therefore when I hide and show the panes they don't repaint correctly and the only way I can get this to repaint is by calling the RecalcLayout() method in a timer object after this has been created but this is not the best way to resolve this. Can anyone from Codejock please check this out?

I have sent in a support ticket too as I need this resolved rather urgently.

EDIT: I have since discovered that this appears to be fine on several forms that use Docking Panes, the form I am having an issue with contains the TrackControl object. The code is no different from every other form yet the one with the TrackControl causes the issue.


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)


Posted By: Xander75
Date Posted: 06 March 2014 at 10:46am
Just a quick update on this, forgot to do so quite some time ago...

I have resolved this issue. It appears that you cannot use the DockingPaneManager control within C#.Net the same way as you would in VB due to how the .Net forms initialise.

So to resolve this I had to put the initialise code for the docking pane into a reusable method for building a DockingPaneManager (not easy if you're not too sure what you're doing) and this could then be added to the load event. Works everytime now without any issues whatsoever.

See the code below:

/// <summary>
/// Creates a DockingPaneManager object
/// </summary>
/// <param name="frm"></param>
/// <returns></returns>
public static AxXtremeDockingPane.AxDockingPane DockingPaneManager(Form frm)
{
    AxXtremeDockingPane.AxDockingPane DockingPaneManager = new AxXtremeDockingPane.AxDockingPane();
    ((System.ComponentModel.ISupportInitialize)(DockingPaneManager)).BeginInit();
    frm.SuspendLayout();

    DockingPaneManager.Enabled = true;
    DockingPaneManager.Location = new System.Drawing.Point(21, 12);
    DockingPaneManager.Name = "DockingPaneManager";
    DockingPaneManager.Size = new System.Drawing.Size(24, 24);
    DockingPaneManager.TabIndex = 0;

    frm.Controls.Add(DockingPaneManager);
    ((System.ComponentModel.ISupportInitialize)(DockingPaneManager)).EndInit();
    frm.ResumeLayout(false);

    DockingPaneManager.AttachToWindow(frm.Handle.ToInt32());
    DockingPaneManager.VisualTheme = XtremeDockingPane.VisualTheme.ThemeResource;
    DockingPaneManager.Options.HideClient = true;
    DockingPaneManager.PaintManager.HighlightActiveCaption = false;
    DockingPaneManager.PaintManager.SplitterStyle = XtremeDockingPane.DockingPaneSplitterStyle.PaneSplitterSoft3D;
    DockingPaneManager.PanelPaintManager.Layout = XtremeDockingPane.XTPTabLayoutStyle.xtpTabLayoutAutoSize;
    DockingPaneManager.SendToBack();

    return DockingPaneManager;
}

How to use this:
// Create a global DockingPaneManager variable
private AxXtremeDockingPane.AxDockingPane DockingPaneManager;

//In the load event, create the object and use as you would have in VB6.
DockingPaneManager = BSDLibrary.Codejock.DockingPaneManager(Instance);


You need to pass the Form instance of which you are adding the DockingPane to and that's all.


-------------
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)



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