LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating either/or like statement when user inputs in specific numerica control

Solved!
Go to solution

Hi guys,

I'm not 100% sure how to word it but I want to control the numeric inputs as so when user is inputting a value into a specific box, the rest would be grey out and be disabled.

Say the user input a value onto the "Desired Flow Total," the rest of the input would be grey out and disabled, allowing just a single value input... not sure if I'm wording this correctly or not.

flow control.png

 

 

0 Kudos
Message 1 of 5
(2,787 Views)

I'm not sure what you want to do.  Let's say you have three controls, A, B, and C.  Let's make them numeric.  If you click on A, then numbers you type will start to populate the Control -- 1, 2 (12), 3 (123), <del> (12), 4 (124) etc.  When you click somewhere else (or type <CR>), the value represented by the characters you've typed get "set".

 

So when did you want to disable the other controls?  When you finish setting A, or when you start setting A?  The former is easy to do, but I'm not sure what it would mean -- I set "A", and "B" and "C" become disabled?  What does this mean?

 

So, in broader terms, what are you trying to do?  What is your idea?  [I frequently say "Tell me what you want to do, not how you want to do it"].

 

Bob Schor

0 Kudos
Message 2 of 5
(2,749 Views)

What I want the system to do is that when I begin to input values into "A", the rest would be grey out and not have any input into the rest of the system, but when I delete the value in "A", the rest would become available to me once again. 

 

The expectation is that at the end of the numeric display, when I input value into A the display would show that exact value, and the same goes to the rest of the groupings as well (since B and C would be a math function requiring multiple user input)

 

Thanks ahead!

0 Kudos
Message 3 of 5
(2,565 Views)

What you are trying to do is, I believe, possible, but tricky (and I would not want to attempt it ...).  An interesting question is "Why is this important?".  I can see that if you require a particular order of "filling in the Controls", you could disable (or even hide) all the controls except the "chosen one", but once a control has been "selected" (presumably by a Mouse Down Event inside the Control), why disable/hide the others?

 

But if you are determined to try ...  I think (but you should experiment and verify that this is the right way to do it) you can determine the "selected" control as it will respond to a Mouse Down Event.  When you finish with the Control, I'd expect it to show a Value Changed Event -- you should experiment using both typing <Return> inside a Numeric Control and clicking outside a Numeric Control to see if both generate Value Changed (I'm guessing "Yes", but I'm a Scientist, so I believe in "doing the Experiment" ...).

 

Bob Schor

Message 4 of 5
(2,552 Views)
Solution
Accepted by topic author Caleb963

Another example of the BAD BAD dynamic datatype 😄

 

I would try to solve that with a event driven state MC  an extra control for the decision    or   .. see example

 eventdriven disable.png

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 5 of 5
(2,547 Views)