Print Page | Close Window

Issue in LoadStateFromString in CommandBars

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=22582
Printed Date: 05 May 2024 at 12:37pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Issue in LoadStateFromString in CommandBars
Posted By: ahmadgames
Subject: Issue in LoadStateFromString in CommandBars
Date Posted: 23 April 2015 at 9:43am
Hi,

When we use LoadStateFromString in CommandBars with enabling the Restore Controls (so we can get the last state and last selected tab ...etc), we will not be able to add any new button in run-time!!

Find the following sample (modified from CJ sample:  http://forum.codejock.com/uploads/6726/RibbonSampleLOADSTATECASE.zip" rel="nofollow - uploads/6726/RibbonSampleLOADSTATECASE.zip ) where you cannot add any button in a ribbon tab group in run time when we enable the Restore Controls (When add a new button under the Review tab when you press the Command Button 1), but if you set this to False, you will be able to add buttons normally, but for sure you will not be able to get the last saved state before closing the application...

Notes:
1) To run the sample, please put the DLL inside the ZIP file (VertexTrading10.4.0) in system32 (or syswow64) and register it (we use this DLL for quick file processing).

2) We save the state when query unload.

3) We load after finishing adding everything in the _Load even of the main form.

If you need any clarifications to replicate the case, please let me know. And update me if we can solve this from our side. Or if it needs update or something.

Thanks.
Ahmad


-------------
Product: Xtreme SuitePro (ActiveX) version 16.3.1
Platform: Windows 8.1 (64bit)
Language: Visual Basic 6.0
--------------------------
Ahmad Majid
Development Manager
Hybrid Solutions



Replies:
Posted By: mcmastl
Date Posted: 07 May 2015 at 12:16pm
Thank you for bringing this to our attention, we have informed our development team and we will be looking into the issue.  If the matter has been resolved please let us know.  

-------------
Luke McMasters, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ahmadgames
Date Posted: 10 May 2015 at 9:21am
Hi,
Actually as a workaround, I managed to reach things (Groups, Tabs, ..etc) using the Index instead of having a direct reference to it.

For now it is working, although I believe it is not the optimum solution, since we work a lot on having reference to many things and nothing is wrong, except when we have reference to groups on your component and make the LoadState with restoring the controls... If RestoreControls is false, the same reference will work fine.

It will be better solving this, since if we go to a scenario where everything can be updated dynamically at runtime by users (hence the tabs, groups index may be changed) then it will not be a correct solution.

Thanks.
Ahmad


-------------
Product: Xtreme SuitePro (ActiveX) version 16.3.1
Platform: Windows 8.1 (64bit)
Language: Visual Basic 6.0
--------------------------
Ahmad Majid
Development Manager
Hybrid Solutions



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