05-21-2014 01:42 PM
CVI 2013SP1, Win7.
I have a touchscreen application with a bunch of numerics on the GUI. The numeric control callback receives an EVENT_LEFT_CLICK when the operator touches a numeric. The program pops up a keypad, operator enters a number, touches ENTER, the new value is sent to the numeric control, and the popup is dismissed.
Problem is, the numeric control is still selected. It resonds to mouse-over by selecting part of or all the numeric contents. It requires another click, or a mouse-click on another control to de-select the numeric. That's a problem.
I have tried all of the following, and the numeric is NOT de-selected:
SetActiveCtrl to another control on the same panel.
SetCtrlVal to another control on the same panel
CallCtrlCallback to the numeric control with EVENT_COMMIT
Isn't there a simple way to de-select a control programmatically?
(PS. It would sure be nice to be able to disable mouse-over events. Like an attribute, ATTR_DISABLE_MOUSE_OVER_EVENTS. Mouse-over events are just a pain in a touch-screen only application.)
05-22-2014 02:33 AM
Hello there!
Using SetActiveCtrl on another control on the same panel should have normally changed the active control to the other control, in a regular CVI application. However, in a touch-screen environment, I suspect that the touch action of the user might prevent the other control to be activated.
Have you checked whether after the user touches <ENTER>, whether activation events get continuously sent to the numeric control, thus, preventing the focus change? This is how something similar can happen in a regular CVI application (might not be very similar to your case, though):
Thoughts:
Best regards,
- Johannes