09-07-2021 06:28 AM
Hello,
I have an issue with the "Shortcut Menu Dismissed Event" when I try to use this on an array element. This event appears only if the shortcut menu was previously activated from the egdes of the array (or from the Index Display). If I active the shortcut menu with the mouse over an element of the array, then the "Dismissed Event" will not appear.
Is there a way to solve this and make the event to trigger ?
I attached a vi to explain the issue.
09-07-2021 11:08 AM
Hmmm... seems to work for me.
09-07-2021 12:14 PM
Replicated in 2020 SP1. Seems like a bug to me. As far as how to get the event to trigger, my only suggestion would be to use a cluster with numeric elements instead of a 1D array. Then, you can add Menu Dismissed events for each element of the cluster and the events will trigger, see the revised VI. The typical size of your array might prohibit that option though...
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
09-07-2021 02:15 PM - edited 09-07-2021 02:16 PM
@FireFist-Redhawk wrote:
Replicated in 2020 SP1. Seems like a bug to me. As far as how to get the event to trigger, my only suggestion would be to use a cluster with numeric elements instead of a 1D array. Then, you can add Menu Dismissed events for each element of the cluster and the events will trigger, see the revised VI. The typical size of your array might prohibit that option though...
How did you replicate the issue? Whenever I right-clicked on an array element, the event seemed to trigger. Did I do it wrong? (LV 2020.)
09-07-2021 02:21 PM
Right click on the array itself and you'll get two events, one when you activate the RCM, and one when you dismiss the RCM. Only the first event triggers when right clicking an element.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
09-07-2021 02:41 PM
Here's a workaround that uses dynamic registration to capture events on the array elements instead of the array,
09-07-2021 03:38 PM
Nothing to add here but an interesting observation that bit me in the past. You probably already know, but just in case.
A rick-click Short-cut Menu Event also triggers a "Mouse Leave" Event for the Pane. I had a transparent control that I hid or showed depending on whether one was in the Pane or Outside the Pane. Right-clicking made it look like someone left the pane when they didn't.
mcduff