10-30-2019 09:17 AM
I am updating the value of a numeric control using setctrlval() function. I have a callback for the control that will read the value of the control and set a string value in another control. When the control is updated using the setctrlval() function it does not cause an event. I need the update of the value to trigger a function. any suggestions?
Solved! Go to Solution.
10-30-2019 12:52 PM
The Programmer's Toolbox has a CallCtrlCallback() function that you can use right after setting the value.
10-30-2019 01:55 PM
That is what I used to work around the issue. The ATTR_VAL_CHANGED only faults when you manually type in a change into the control. If you update it using setctrlval() it does not. I am surprised they do not have an update event. Thank you!
12-11-2019 03:31 AM
If you update it using setctrlval() it does not. I am surprised they do not have an update event.
That is normal behavior, otherwise setting a value from that control's callback would loop endlessly. Without having to use CallCtrlCallback, you can simply call the callback function directly and pass it the proper event.