From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Know when I am clicking in labview

Solved!
Go to solution

Hello,

 

I have a Slide With A+/A/A- and I want that second after I press/select A+/A- to change to A. The problem is that when I am pressing A+/A- for more than a second, it returns to A and inmediately change to A+/A-. So i want to put a case where it returns to A when I am not pressing the click of my mouse. I don't know if that is possible to know in Labview.

 

0 Kudos
Message 1 of 8
(777 Views)

Hi lab,

 


@electronic_lab wrote:

I have a Slide With A+/A/A- and I want that second after I press/select A+/A- to change to A. The problem is that when I am pressing A+/A- for more than a second, it returns to A and inmediately change to A+/A-. So i want to put a case where it returns to A when I am not pressing the click of my mouse. I don't know if that is possible to know in Labview.


Yes, it's possible!

Spoiler
You should use MouseUp/Down events, but don't forget about the MouseLeave event…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(756 Views)

And how? Can you help me?

0 Kudos
Message 3 of 8
(753 Views)

Hi, I didn't quite understand your question but I believe I can help you. Do you have the code where you are trying to perform this functionality?

0 Kudos
Message 4 of 8
(739 Views)

Try this

-------------------------------------------------------
Applications Engineer | TME Systems
0 Kudos
Message 5 of 8
(728 Views)

Hello, I can't attach all code because I don't want to share all my program. But the part that I want is this:

 

My start position of the slide if A 

 

 

And I want that when I select A+, the slide stays in A+ for 1 second. After it, the slide must return to A. The problem is that if I am still clicking the point A+, after a second it will return to A and then instantly to A+. So that's why I want to put a case where it will move to A 1 second after I stop clicking A+. I hope i have explained myself.

d9460ac7-2305-44d4-be81-15cea005368c.png

A+.png

0 Kudos
Message 6 of 8
(722 Views)

@electronic_lab wrote:

And how? Can you help me?


With mouse event something like this:

mouse.png

on the other hand, there are different ways how to get things done.

Take a look into attachment. may be will be helpful as "getting started"

Download All
0 Kudos
Message 7 of 8
(719 Views)
Solution
Accepted by electronic_lab

Mouse Up event. you can also add Mouse leave event.
is it your idea?

maxnoder1995_0-1714136041854.png

 

0 Kudos
Message 8 of 8
(710 Views)