LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Should the Save and Recall Panel State functions work with tab panels?

Presently using CVI 6.0 and Win XP.
 
Should the Save and Recall Panel State functions work with tab panels?
 
The functions work fine with "normal" panels, but presently not with tab panels.
 
Files do get created with the Save, but when recalling, the tab panels do not update. No error messages.
 
Just want to know if it can be done.
 
Thanks,
 
Scott T.
0 Kudos
Message 1 of 5
(3,688 Views)

Just a question (I never tried it but it should be simple to test): are you passing to SavePanelState the handle of the "parent" panel (the one which holds the tab control) or the handles of the "child" ones (the panels grouped in the tab control)?

It is possible that if you are saving the parent panel you are not really saving the values of controls on the tabbed panels, which are indipendent entities in the program just grouped in the tab control for logic reasons.

Hope this helps

Roberto



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 5
(3,678 Views)

Hi Roberto,

I've tried both the parent and child handles. Also tried using the Easy Tab Control handle returned by EasyTab_ConvertFromCanvas. Tried using LoadPanel with and without a parent ID as well as not doing a LoadPanel for any of the child panels. My application always compiles fine and runs the same. Controls on the parent always save, but the child panels don't.

What is the proper setup for the child panels? I assume I need a call to LoadPanel to get a handle for the individual child panels. Then it should be simple save and recalls referencing the child handle.

Any insights are appreciated.
 
Scott T.
0 Kudos
Message 3 of 5
(3,670 Views)
Hi Scott,
 
I dont know if i have understood your question correctly, but from what i gathered you are having trouble saving the sub-panels. Well i have used the save panel and recall panel state......Basically once u hv made the changes to the panel......using SavePanelState() save that panel handle! and then the next time recall that panel state using RecallPanelState()......it should work fine.
 
As Roberto said u might not b actually saving the data which is on the panel thats why it aint working.
 
Hope you get a breif idea how to go round it. I will see if i can get a better and more precise answer.
 
Thanks
 
k1_ke
0 Kudos
Message 4 of 5
(3,660 Views)
Well, it turns out the key to the problem was to pass the child panel handles in the call to EasyTab_LoadPanels.  Finally figured it out after digging into the function panel help section. I had been passing zeros as shown in the easytab sample code.
 
Thanks to all for the support.
 
Scott T.
 
 
0 Kudos
Message 5 of 5
(3,654 Views)