LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

After using EasyTab_SetAttribute() to set tab panel active, SetActiveCtrl () doesn't work.

I call EasyTab_SetAttribute (Panel, TabCtrl, ATTR_EASY_TAB_ACTIVE_PANEL, ScnPanel) to set an active tab panel.  The panel is displayed with the tab label highilighted. When I call SetActiveCtrl (ScnPanel,control) the control does not become active, although the function returns successful (0). The tab label is still highlghted.  When I try to use the mouse to select any entry box in the panel, they do not become active, and I can not enter any data. However, checkboxes and pull downs work.  The TAB key also works to move the highlight/active control. In fact, once I move the highlight of the tab label to a control, the mouse works.

 

 

 

Thanks for yout help.

0 Kudos
Message 1 of 4
(3,036 Views)

This is definitely a strange behaviour: the EasyTab control is included in CVI from its release 4: it's a mature instrument fully debugged and I never observed a similar behaviour when using it. Can you reproduce this behaviour in a small sample project and post it here so that we can look at it and try to understand what's happening?

 

Besides it, with newer versions of CVI (I seem to remember from CVI8 on) a native tab control has been introduced: if you are using one of these versions you could plan to move to native tab control instead of using EasyTab.



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?
Message 2 of 4
(3,032 Views)

I realize this thread is almost 4 years old, but I came across the same problem today.  I wanted to provide a solution for it.

 

To work-around the problem with the active control and Easy Tabs, you must call SetActivePanel before SetActiveCtrl.  In your case, it is:

 

SetActivePanel (ScnPanel);

SetActiveCtrl (ScnPanel,control);

0 Kudos
Message 3 of 4
(2,732 Views)

Hello LoKK,

thanks for giving your solution. Smiley Happy

 

Nevertheless, unless you are developing on a version of CVI prior to 8 I strongly recommend you to move your code to the built-in tab control which supersedes EasyTab instrument.

Having integrated the tab control in native UI controls makes it less likely that EasyTab is maintained over time: you can see that the instrument has not been updated since 2012 and additionally it cannot be run in 64-bit code so it is a good option taking some time to practice with the native control and your code to it, which is not so difficult.



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 4 of 4
(2,720 Views)