10-31-2021 12:27 PM
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.
Solved! Go to Solution.
10-31-2021 02:33 PM
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"?
11-01-2021 01:17 AM
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.
11-01-2021 06:47 AM
Have you considered just making it very narrow?
11-01-2021 07:33 AM
Or put a transparent decoration over it.
11-01-2021 07:43 AM
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).
11-01-2021 08:23 AM
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