10-18-2010 04:06 PM
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?
Solved! Go to Solution.
10-19-2010 02:58 AM
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
10-19-2010 06:14 AM
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?
10-19-2010 06:54 AM
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...