LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

close or hide or disable a menu ring or enum with programming

Solved!
Go to solution

Hello, I want the menu of a ring or enum to open only if it is clicked with the scroll button. I had thought with a property node to disable the appearance of that menu when left clicked but I don't know how to do it. sorry my original language is Spanish.

0 Kudos
Message 1 of 7
(1,653 Views)
Solution
Accepted by bastianfranko

Hi Bastian,

 


@bastianfranko wrote:

I want the menu of a ring or enum to open only if it is clicked with the scroll button. I had thought with a property node to disable the appearance of that menu when left clicked


You can use a filter event: filter left mouse clicks on your ring/enum control!

 

What is a "scroll button"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(1,637 Views)

To expand on Gerd's reply:

 

You want to use a Mouse Down? event (note the ? which means it's a filter event) and then you can use the terminals on the right to either discard the event or change which button was pressed, so that you can discard a right click and turn a middle click into a right click.

 

Note that the button number isn't guaranteed. For my mouse, the middle button is button 3, but it might be different on different mice/PCs. You might need to have it configurable in code.


___________________
Try to take over the world!
Message 3 of 7
(1,611 Views)

Have you considered just making it very narrow?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 7
(1,603 Views)

Or put a transparent decoration over it.

0 Kudos
Message 5 of 7
(1,596 Views)

Right Click Menu.png

 

This makes the right click act like a normal click, and disables the normal click.

 

You can add this functionality in a callback VI, so it doesn't spoil the main event structure that much. But that's step 2 (or 3, or n).

Message 6 of 7
(1,591 Views)

Thank you so much! I was not very familiar with filter events. It is the solution I needed.

With the scroll button I was referring to the 3rd mouse button

0 Kudos
Message 7 of 7
(1,584 Views)