LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Touchscreen Button Presses Require Sideways Finger Movement

Greetings, forum. I have a CVI program (running on a small Windows 10 "pad" sized computer) that uses several "Command Buttons" as a "momentary-contact pushbuttons". I do this by starting an operation (say, turn on a motor) on "EVENT_LEFT_CLICK" and ending the operation (say, turn the motor off) on "EVENT_LEFT_CLICK_UP". This works fine when using a mouse, but I'd like to be able to use this program purely in touchscreen mode, so that I can remove the keyboard and mouse, attach the computer to the machine it's controlling, and use it as a control panel in touchscreen mode only.

 

But there's a problem: in order to get the buttons to visually change color and depress and generate left-click & left-click-up events, I have to move my finger sideways while operating controls. If I don't do that, then the buttons won't depress (change color) and either generate no events, or generate right-click events instead of left-click events. And this is not good because I would like the control panel to be usable by people who are unaware of this glitch and just "straight-push" the buttons.

 

So, is there any way to get command buttons to work correctly on touchscreens without having to move one's fingers in little slow circles? Maybe by using a different control? Or using different events? Or changing control settings? Or changing Windows settings?

0 Kudos
Message 1 of 3
(929 Views)

I have never tried to use buttons in such a way, but the right-click event on a long press is the standard response of touch screens so I tend to consider that you cannot simply use the software as-is with a touch screen.

If you don't need the right-click event on your controls you may simply trap and use it like left click one. You will have a delay in user response though.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(884 Views)

Re "I have never tried to use buttons in such a way": I'm surprised, because it seems the most natural way to use CVI. That's what the "VI" in "CVI" stands for, no? "Virtual Instrumentation"? As in, controls on a touch screen? Otherwise, it's just "C".

 

Re "the right-click event on a long press is the standard response of touch screens": Not all "long presses" generate "right-click" events. In fact, if you wiggle your finger slightly, they never do. Instead, a slightly-wiggly long (or medium, or short) press will always generate a EVENT_LEFT_CLICK event on button-down, and a EVENT_LEFT_CLICK_UP event on button up, with no right-click events at all.

 

So my question, essentially, is: How can one get rid of the need for the "wiggle"?

 

Re "I tend to consider that you cannot simply use the software as-is with a touch screen": True, obviously the wiggle need is suboptimal. So, how does one alter the software so that it is not "as-is"? (Ie, so that the need for wiggling one's finger while operating controls is removed.)

 

Re "If you don't need the right-click event on your controls you may simply trap and use it like left click one. You will have a delay in user response though.": No. It doesn't work like that. Any finger press of a command button on a touch screen will either generate right-click events only (if no wiggle), or left-click events only (if you wiggle your finger). Yes, the right-click-down event is delayed by about 1 second, and doesn't cause the button to visually "depress" (change color and shading). That's why I want to find a way to generate left-click events sans-wiggle: to get rid of the delay and get the normal visual feedback provided by the "command button" control. (Or if that can't be done, so other control with similar shape and operation.)

 

0 Kudos
Message 3 of 3
(877 Views)