LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with EasyTab and RecallPanelState

I am using CVI7.1 with EasyTab controls. Is anyone aware of any issues using EasyTab in conjunction with Save/RecallPanelState() ? My program saves and restores all the contents of the main panel and each EasyTab child panel successfully, but sometimes the incorrect Tab is shown as selected after a Restore - just the tab: the child panel contents are OK!. At this point I try to use ATTR_EASY_TAB_ACTIVE_PANEL to force the correct tab to be displayed, but the system thinks that it is already showing the correct panel contents (which it is) so it does not update the tab. I have to click in a different one and then back again, to correct it.

 

Does anyone else recognise these symptoms?

 

JR

0 Kudos
Message 1 of 13
(4,867 Views)

Hi jr_2005,

 

Have a look at this forum : http://forums.ni.com/ni/board/message?board.id=180&requireLogin=False&thread.id=20789

 

Let me know if this solves your problem or if you have any more questions.

 

Kind Regards,

Owen.S
Applications Engineer
National Instruments
0 Kudos
Message 2 of 13
(4,843 Views)

Thanks for the reply, Owen. That thread does not describe my problem - all the controls on my EasyTab panels are being saved and restored exactly as I expect. The problem is that the incorrect tab is being shown on the correct panel, after a Recall. Clicking the bad tab at that point, or using ATTR_EASY_TAB_ACTIVE_PANEL does not help, as the control thinks it is already displaying correctly so it does nothing. I have to select a different tab and then the original one again before the correct situation is recovered.

 

I am thinking that some setting or attribute for the EasyTab control itself (converted from a Canvas) is not being saved/restored on its parent panel (which I am also saving/recalling at the same time as the tab/child ones) and so is getting into a bad state.

 

I realise that if this is a CVI7 bug there is no hope of a fix, but if someone knows of some workarounds that I haven't thought of it would be helpful.

 

JR

0 Kudos
Message 3 of 13
(4,833 Views)

Hi JR,

 

Ah okay, what about this link? http://sine.ni.com/devzone/cda/epd/p/id/2118

 

It seems to be finding the Active panel but using different commands to the ones you posted.

 

Also Note: CVI 8.0 and higher now includes a native tab control, which provides a easier to use alternative than the Easy Tab instrument driver.

 

Kind Regards,

Message Edited by Owen.S on 01-15-2010 08:21 AM
Owen.S
Applications Engineer
National Instruments
0 Kudos
Message 4 of 13
(4,833 Views)

No that doesn't shed any light on the problem either. For the immediate future we are stuck with CVI7 - I am aware that later CVI versions employ a different method of implementing tab controls, but that's not an option for me.

 

JR

0 Kudos
Message 5 of 13
(4,829 Views)

Hi JR,

 

Sorry none of my links have proven useful so far :D, could you maybe send some screenshots of this problem?

 

Kind Regards,

Owen.S
Applications Engineer
National Instruments
0 Kudos
Message 6 of 13
(4,822 Views)

Attached is a simple program which demonstrates the problem I have in CVI7.1. As soon as it runs, click the Save button. (To save all the panels/tabs.) Now click TAB2 and then click Load. The contents of the Tab will show TAB2, but the tab label will show TAB1. At this point CVI is confused, because clicking the "Select TAB2" button (to programmatically select the tabs) has no effect - CVI thinks it is already correctly showing TAB2, despite the incorrect tab label being shown.

 

All suggestions welcome!

 

JR

0 Kudos
Message 7 of 13
(4,803 Views)

Hi JR,

 

I also was able to reproduce the problem you described.

 

The immediate workaround is to save the active tab panel manually in a global variable during Save callback and to set it back in Load callback.

I tried that and it worked. 

S. Eren BALCI
IMESTEK
Message 8 of 13
(4,798 Views)

Thanks for the suggestion, Eren, but I already tried that and it didn't work for me. The sample code I posted also showed the problem why - clicking on the "Select TAB2" button tries to set the Active Tab panel programmatically but it still fails, as CVI is convinced that it is already showing the correct panel! Is your CVI different to 7.1?

 

JR

0 Kudos
Message 9 of 13
(4,791 Views)

Unfortunately, I do not have any 7.1 installers available.

 

I made my trials with 8.5.

If the uir file was compatible, I could try it with 6.0, but it did not open.

 

"Select TAB2" button fails for me, too.

Also, in my case, when I press Load, tab title swithces to TAB1, but tab text remains TAB2 (this also compatible with you).

 

If I press "Select TAB1" button at that instant (or click TAB1 title), I reach the saved state (TAB1 title, TAB1 text).

That's why setting the active panel manually inside Load callback works for me.

Wasn't that the situation in your case? 

S. Eren BALCI
IMESTEK
0 Kudos
Message 10 of 13
(4,785 Views)