Print Page | Close Window

LoadState makes Panes Invisible

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=1863
Printed Date: 28 September 2024 at 12:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: LoadState makes Panes Invisible
Posted By: Bjarne
Subject: LoadState makes Panes Invisible
Date Posted: 26 February 2005 at 4:37am

Hello,

I am seeing an unexpected behavior that I cant seem to find a solution for. I use the following code in the Form_Load event to create a Docking Pane:

    dockPane.SetCommandBars Me.cmdBar
    Set A = dockPane.CreatePane(PANE_SHORTCUTBAR, 200, 120, DockLeftOf, Nothing)
        A.Tag = PANE_SHORTCUTBAR
        A.Options = PaneNoCloseable
    Set b = dockPane.CreatePane(PANE_GRID, 700, 400, DockRightOf, A)
        b.Tag = PANE_GRID
    dockPane.VisualTheme = ThemeOffice2003
    dockPane.NormalizeSplitters
    dockPane.Options.HideClient = True
    dockPane.Options.DefaultPaneOptions = PaneNoCaption
    dockPane.Options.UseSplitterTracker = True
    dockPane.LoadState "BRiis.Com", App.ProductName, "Layout\DockBarMain"

I use a SaveState command in the Form_Unload event. Whitout calling the LoadState Method the form looks correct and behaves correct. But when caling the LoadState Method both Panes just get Grey with no display of any Controls. I can still see the SplitterBar and move it around, but the form is really no good without any visible controls.

I am attaching Picture boxes instead of forms to the Panes, and don't know if that makes a difference but as said it works fine as long as I don't use the LoadState method. Any ideas what is wrong?




Replies:
Posted By: Oleg
Date Posted: 26 February 2005 at 9:45am

Try don't use "\":

dockPane.LoadState "BRiis.Com", App.ProductName, "Layout_DockBarMain"



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


Posted By: Bjarne
Date Posted: 26 February 2005 at 10:49am

Hi Oleg,

Thanks for the quick reply. Unfortunately that gives exactly the same result. Any other ideas?

Bjarne



Posted By: JamesH
Date Posted: 28 February 2005 at 11:42am

How are you assinging the handles to the panes?  Are you doing it in the Attach callback?

I had a similar problem and the issue was I assigned the handles during the create method so everything worked fine until I called Load.. Load will re-create all the panes so you also need to re-assign the window handles.



Posted By: Bjarne
Date Posted: 28 February 2005 at 12:09pm

Yes I assign the handles in Attach Callback, so that should not be a problem. The only difference I see between what I do and the Samples supplied by Codelock seems to be that I use Picture boxes that are placed on the same form as the Docking Bar as compared to seperat forms.

Bjarne



Posted By: tknijff
Date Posted: 15 March 2005 at 2:58am

I have two notes that may be could solve your problem:

1. A pane id should not be 0 (start from 1)

2. Use the Resize-event of the picturebox to set controls on the right position

Thierry



Posted By: Oleg
Date Posted: 15 March 2005 at 3:43am
May be you have no corresponded SaveState?

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


Posted By: JSram
Date Posted: 16 October 2006 at 5:47pm
I have exactly the same problem with 10.3.1, I attach a PictureBox (hosting some controls) to the Pane

Private PaneCtr As XtremeDockingPane.Pane


Private Sub PaneMan_AttachPane(ByVal Item As XtremeDockingPane.IPane)
Item.handle = picControl.hWnd

End Sub

In Form_Load()

Set PaneCtr = PaneMan.CreatePane(1&, 250, 250, DockLeftOf, Nothing)
PaneMan.AttachToWindow picChart.hWnd
With PaneCtr
    .Title = "Chart Control"
    '.Hidden = True
    '.Options = PaneNoFloatable
    '.MinTrackSize.SetSize 500, 500
    '.MaxTrackSize.SetSize 500, 500
End With
PaneMan.ShowPane 1&

If I set .Hidden = True or .Hide, the pane shows up hidden as a grey strip to the left and it wont expand when the mousepointer hover over it or get clicked. It's simply disabled.

Same if I SaveState on Unload with it hidden and then use LoadState, same grey disabled strip shows up.

Note, I attache the pane to leftof another picturebox as this seem to be only way to make it expand and overlap a part of it.

I also tried to load a form in the pane, but that just crashes VB6 IDE when app closes.





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