LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know a RING's Control_ID Which in the TAB control

    I am a trio in CVI,I want to get a RING's value using GetCtrlVal(PANEL,PANEL_RING',&ringvaule);but  CVI report that  "51, 31 Undeclared identifier 'PANEL_BINARYSWITCH_2'".and the Ring Control is in the TAB Control ,the TAB Control is in the PANEL.I doubt I wrote the wrong Control_ID,anyone can give me some advices?Thanks!

0 Kudos
Message 1 of 3
(2,405 Views)

First of all, the first parameter in GetCtrlVal is not the panel constant name but the panel handle instead, which you get from LoadPanel. This is clearly stated in the help for the function, that you should carefully read.

 

After you understand this, when addressing controls on tab pages you must use the correct panel handle, which you obtain by calling GetPanelHandleFromTabPage command. Again, carefully read the help to understand what to put in command parameters.



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 3
(2,385 Views)

Besides looking at the help for the functions you are calling, using the forum search function is a valuable resource you should take the habit to use before posting.

 

Handling controls on tab control pages has been widely discussed in the forum: a quick search would have returned several discussions that could have pointed you to the correct solution without need to post and wait for responses.

As an example, this is the result page for "addressing a control on a tab page" search: the first 3 or 4 discussions report the same answer as I gave you before.



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 3 of 3
(2,381 Views)