LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating UI elements that are invisible until preceding UI elements are entered


@JayWW wrote:

I guess I'm asking how would you associate two or more elements to the same step? I'd like to have string inputs associated with boolean buttons so that the text box and button associated with each step are active together.


Maybe all you need is a single string control and a single input button where the meaning changes based on state.

 

altenbach_0-1629296792600.png

 

 

See attached example

Message 11 of 14
(521 Views)

I appreciate all the input! And seeing these different examples has really been educational. Maybe I should share more of the big picture as to what I'm trying to accomplish. 

 

I'm currently attempting to create a UI that has the user enter both string and numerical data to be used to both modify the way the test runs, and is also preserved to generate a test report. 

 

So I'm thinking maybe just having 15 or so text boxes all available at the same time would be a simpler option? Then when the user clicks the "submit" button, all the data gets moved into an array and the test begins. 

 

Otherwise, creating a similar VI to the stepper example with multiple types of data and multiple different labels seems a bit much. Or am I missing an easy way to accomplish this with a stepper style VI? 

 

I appreciate the help!

 

Jay

0 Kudos
Message 12 of 14
(515 Views)

@altenbach wrote:

Here is a very simple example that can potentially give you some ideas.

(Note that most architectural choices have a good reason. For example having the FOR loop before the event automatically ensures that the program starts up in a defined state. If there are many other events and timeouts, you can ensure that the property update only occurs as needed with a little bit more code)

 

 

altenbach_0-1629217101742.png

 


I see no dataflow dependency that makes the FOR loop execute before the event loop.  Well, it depends on the user not being able to click a button before the FOR loop finishes executing, so I guess that's a kind of dataflow dependency, although really it's just a race condition that the code is always going to win.  😉

Perhaps any one of those wires inside the FOR loop can come out and be attached as an input (going nowhere) to the event structure to ensure that the FOR loop completes before the event structure starts?  Or is that an example of the "little bit more code" you were talking about?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 14
(489 Views)

@billko wrote:
I see no dataflow dependency that makes the FOR loop execute before the event loop.  

Yes, technically we could add a dependency wire. However, it will not really prevent anything because even if there is such a data dependency, events can be still registered during execution of the FOR loop.

0 Kudos
Message 14 of 14
(426 Views)