From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Update numeric while typing

I saw a few old posts about this topic with some workarounds, but neither really works in my case.  I have a popup with a min and max field, and a return button.  The button gets disabled when min is >= max.  The problem is when I start typing in a valid value the return button doesn't enable until I'm done, which blocks me from using the enter button to exit the vi.  Please see the attachment for a clearer explanation.
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 1 of 8
(3,583 Views)
Which workarounds in those posts have you tried? The most common one that I know of is to use the Input Device Control VIs to capture keyboard presses and to see which control has focus. You capture the keys, and store them in a buffer to emulate what the control has, and you can make decisions based on this.
Message 2 of 8
(3,559 Views)

I hadn't tried any of them, but the descriptions didn't fit with the enter key like I was trying to use it.

 

Anyway, I came up with the attached workaround, using key down events.  It seems to work so far as I've tested

--
Tim Elsey
Certified LabVIEW Architect
Message 3 of 8
(3,548 Views)
Sorry, I have an older version of LabVIEW so I cannot see your VI.  Is it possible to include an event in your event structure for the numeric control that enables the return button on a key press?  (I guess either key up or down, but convention says "up.")
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 4 of 8
(3,540 Views)

Sorry, when you said "old posts" I thought you meant like really old, like before event structures. God, am I really getting old? Smiley Very Happy

 

By the way, in your specific case you don't need to check the error clusters. The error out for the Scan From String is useful if the format string is programmatically created (which you're not doing). The function will tell you if there's a problem with format string by generating an error.

Message 5 of 8
(3,539 Views)
Late by a few minutes.  😉
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 6 of 8
(3,537 Views)
No, I think I need them.  For example, if you have -3 and press delete you will be left with -.  This will throw an error.  So in that case, I keep the OK button disabled using the error cluster.
Message Edited by elset191 on 08-04-2009 02:12 PM
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 7 of 8
(3,536 Views)

I posted my solution to this problem here

Check it out. Hope it helps.

0 Kudos
Message 8 of 8
(3,132 Views)