Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - LoadState makes Panes Invisible
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

LoadState makes Panes Invisible

 Post Reply Post Reply
Author
Message
Bjarne View Drop Down
Newbie
Newbie
Avatar

Joined: 30 December 2003
Location: Denmark
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bjarne Quote  Post ReplyReply Direct Link To This Post Topic: LoadState makes Panes Invisible
    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?

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: 26 February 2005 at 9:45am

Try don't use "\":

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

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

Joined: 30 December 2003
Location: Denmark
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bjarne Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 147
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Bjarne View Drop Down
Newbie
Newbie
Avatar

Joined: 30 December 2003
Location: Denmark
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bjarne Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
tknijff View Drop Down
Newbie
Newbie
Avatar

Joined: 11 February 2005
Location: Netherlands
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote tknijff Quote  Post ReplyReply Direct Link To This Post 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

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: 15 March 2005 at 3:43am
May be you have no corresponded SaveState?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JSram View Drop Down
Groupie
Groupie


Joined: 22 October 2004
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote JSram Quote  Post ReplyReply Direct Link To This Post 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.


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.172 seconds.