LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Menu Design using Event Handler and Containers

Solved!
Go to solution

I am going to redesign my menu interface using a Labview Event Structure which has many control on tab pages.  I want to start out doing the correct design approach here.  By registering the front panel controls[] property as an event, I can write event cases for each of the controls on the front panel.  However, I run into difficulty when I have controls on tab pages.  I have attached a VI which shows how I want to set it up.  The event hanlder only fires when I change pages on the tab control. 

 

What is a good way to be able to decipher individual controls on the tab control and

what is the characteristic (label, ref number, etc) that I should be writing the event cases on for good code maintenance? 

0 Kudos
Message 1 of 4
(2,826 Views)

There should be a Controls[] property for the tab (or each of the tab's pages).

To decipher, use the labels. Also it's wise to place the controls in the processing event-case (or case-case) in order to quickly navigate to this section of code.

 

Felix

0 Kudos
Message 2 of 4
(2,803 Views)

Thanks, but the changevalue event does not fire when the controls on the tab page are pressed.  How do I get the event to fire?

0 Kudos
Message 3 of 4
(2,791 Views)
Solution
Accepted by topic author id

Looking at your code, you registered for value change events for controls on the front panel, not in the tab control. Use the property node for the tab control to get the references to the pages and for each page get the references for the controls on that page. Build an array of all controls on all pages (or you could separate the registration for each page to make your life easier potentially) and register those controls for value change events. See below...

 

Register Tab Control Events.png

0 Kudos
Message 4 of 4
(2,786 Views)