LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structure: Can you trigger on "key focus"?

I have a string combo box.  The Event structure is used to monitor operator entries, etc... and not have a loop run needlessly.  No problem with the Event Structure.
 
I am trying to detect that the operator actually clicked on, but did not make a valid selection.  Just pressed ENTER without changing the value.  I already do have a FocusKeyBind tied with the ENTER key and a "fake/hidden" button (called ENTER), but I will need to know if I can trigger on the ENTER key, and not the value change from the combo box.
 
I did add the ENTER button as one of the trigger within the Event Structure for that case (2 triggers - see image below).  I removed the text to preserve confidentiality of code / client..  If the operator selects one of the choices, it works fine.  I want to change return the focus to that control if the selection was not made or not made properly.
 


Message Edited by JoeLabView on 12-07-2007 10:50 AM
0 Kudos
Message 1 of 2
(2,854 Views)
Joe,
 
What about using the keydown? event on the combo box.  If the enter key is pressed, then discard the key.  Perhaps do a search on the current value of the control compared to the array of strings and values, and discard the enter if the current value is not in there.
 
I'm not really clear on what your use case is, but just a thought that keydown? with the right combination of case structures could do what you are trying to do.
0 Kudos
Message 2 of 2
(2,819 Views)