LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a "coerced value" event?

Is there an event generated when the value of a Numeric is coerced?

How can I be notified when this happens?

I'd like showing a message popup nicer than the one that appears if I set "Range checking" to "Notify"...

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 3
(3,064 Views)

Vix:

 

Sorry, there is no coerced value event.

 

In a numeric control, if you enter a number that violates the min or the max, the events generated are EVENT_KEYPRESS, EVENT_VAL_CHANGED, and EVENT_COMMIT.  If you want to create your own pop-up for an out-of-range value, you need to do your own range checking.  Leave the limits at the default max and min.  Create a callback for the numeric control.  In the callback, wait for EVENT_COMMIT, then read the value, compare it to the desired range, and pop-up your message if it's out of range.

 

You can use the UI editor to see what events are generated.  On the UI editor toolbar, click on the Operate tool (looks like a finger pressing a red or green button).  Then in your numeric control, enter a number outside of the range for the control, and watch the events that are displayed to the right of the UI editor toolbar.

 

Off the subject, what is the meaning of your signature line In claris non fit interpretatio?  My best guess is that "truth needs no interpretation".

0 Kudos
Message 2 of 3
(3,055 Views)

Hi Al_S

thank you for your help.

I often use the Operate tool, so I've already seen the "official" events generated for a numeric control... and I thought to a solution like the one you suggested.

I hope there is a kind of hidden (undocumented) event to use... but probably I'm not so lucky.

It could be a feature request, I think.

 

 


Off the subject, what is the meaning of your signature line In claris non fit interpretatio?  My best guess is that "truth needs no interpretation".

The meaning is that if something is explained in a clear way, it doesn't need interpretation... and so there won't be misunderstanding.

 

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 3 of 3
(3,050 Views)