11-06-2013 01:57 AM
Hi all,
I find that Labwindows allows user to choose the valid range of data for controls in the user interface. When user input anything beyond the set range, there will be a red-frame box to indicate the error range. but if I intentionally input something beyond the range and some code (which will read the number input from that control), I found that the program will run also. So, range validation doesn't really stop the execution of the code. Is that any way to raise an error so to stop the execution of the code if there is any data with invalid range? Thanks.
11-06-2013 02:05 AM
None that I know of ![]()
You have two alternatives:
- set controls with Range checking = Coerce
- issue a ValidatePanel before processing user input and stop if return value = 0
11-06-2013 02:19 AM
In your callback you can check for EVENT_VAL_COERCED
11-06-2013 10:35 AM
@Wolfgang wrote:
In your callback you can check for EVENT_VAL_COERCED
Thanks. I think that's what I am looking for
11-06-2013 11:08 AM
Glad to hear, good luck and post back if you succeeded.