Print Page | Close Window

SOLVED: Method 'Select' of object 'IPane' failed

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=11660
Printed Date: 07 July 2024 at 7:02am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: Method 'Select' of object 'IPane' failed
Posted By: JasonG
Subject: SOLVED: Method 'Select' of object 'IPane' failed
Date Posted: 30 July 2008 at 9:28am
I am using the following code to force a pane to be visible once a CommandBarButton is clicked... This button may be hit throughout the use of the application, but it is always after the pane has fully loaded.

    UserPane.Hidden = False
    UserPane.Select

This Code Worked fine up until recently. When I got to thinking about what was changed, I realized that I recently added the SaveState/LoadState code for the DockingPaneManager.

  DockingPaneManager.LoadState RegKey, "ObjectStates", "DockingPaneManager"


Now, The SaveState/LoadState work properly, but when the first block of code is called, I get the following error on the UserPane.Select line...

Method 'Select' of object 'IPane' failed


If I REM out that line and let the code run, nothing happens, and if I hit the CommandBarButton again, I get this error on the UserPane.Hidden line...

Method 'Hidden' of object 'IPane' failed


If I REM out the
DockingPaneManager.LoadState Code, All operates as normal...


-------------
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6



Replies:
Posted By: Oleg
Date Posted: 31 July 2008 at 2:13am
Hi,
 
Yes, after you load state your UserPane variable is not valid anymore.  use FindPane method to find actual pane.


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


Posted By: JasonG
Date Posted: 31 July 2008 at 8:36am
Perfect. I re-assigned my UserPane variable after the LoadLayout and it works great. Thanks.

-------------
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: 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