08-12-2011 10:40 AM
CVI 2010 SP1
Looks like there is a bug in the TAB control in this version of CVI.
In the included app, I have 6 tabs, each of which I have a numeric dial
with two indicators.
There is one callback servicing all the tabs.
The problem is only one of the numerics on one specific tab (#4) is
reporting its value correctly. The other tab numerics repeat the tab
#4 value and not their own. The numeric changes on the tab, but
the gectrlval read does not follow with the change, it reports the tab #4
value with each change event.
08-12-2011 11:39 AM
Hello -
There's not actually a bug here, just a little bit of confusion about tab page panel handles. I've modified your example some and added some inline comments. Hopefully it will clarify things for you.
The main issue is that in the callback function for the numeric control, the panel parameter is the panel handle for the tab page, which means you do not need to call GetPanelHandleFromTabPage. The panel parameter for a callback function is the panel handle for the panel the control in question resides on - in this case a tab page. With this information, you should be able to resolve the issues you were seeing.
NickB
National Instruments