LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tab control and event structure

Hello All,
I have a rather complex front panel and I have tried to make it look readable using a tab control. How do I enter into a while loop if a certain page is selected in the tab control? I should exit the while loop the moment the user clicks out of the tab. I have done this with some rather complex looking code which invlove the user clicking an exit button, but I would like to simplify it with an event structure where just moving from one tab to another would close the loop automatically and no extra "Quit while loop button" is necessary. Any one had ideas about using a tab control and event structures?

Thank you,
KB
0 Kudos
Message 1 of 4
(3,391 Views)
Hello KB,

that's easy:
The tab control has a connector in the block diagram, which gives you the selected tab as a number. Just check this number to get the selected tab. If the user selects the correct tab, start the while loop (perhaps using a case structure...). In the while loop check a local variable of the tab to see the user change the selected tab. End the while loop when this happens.

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(3,391 Views)
Gerd,
Can you please send the 7.0 version of the example? I do not have 7.1. Thanks

Karthik.
0 Kudos
Message 3 of 4
(3,391 Views)
Here it comes...

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(3,391 Views)