LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing data into event

Simple Question: I have text controls that I wish to take values from when a button is pressed. Using Events, how do I get values and store them...
0 Kudos
Message 1 of 3
(2,736 Views)
Are the values needed in any other portion of the program other than when the button is pressed? If not, you could place the controls within the event structure so that their values are only read when the button controlling the event structure is read. Note, though, that if the values are passed from the event structure to other portions of the program you need to determine the best approach for passing data when the button is not pressed (perhaps passing through a value from the last event).

In the event that the controls are needed in other parts of the program separate from the event structure you can use local variables to read the current value of the controls.

I hope this helps.

John
0 Kudos
Message 2 of 3
(2,736 Views)
Simple answer: Create a Value Changed event for the button and put the string indicators inside that event case.
0 Kudos
Message 3 of 3
(2,736 Views)