Jump to content

Right click handling returns 2 references for item inside a cluster


Recommended Posts

I'm working on a right click plugin but am running into an issue with grabbing the reference to only 1 item inside a cluster (can be front panel or block diagram constant).  If I right click a single item inside a cluster, the right click 'Affected Items' returns 2 references: the reference to the item I selected as well as the parent cluster. 

However, if I multi-select 2 (or more) items, I do not get the parent cluster reference returned.  It could be two items within a single cluster, or any two items at all.  'Affected Items' returns only 2 references.  Best I can tell, it's impossible to identify when only a single cluster item was selected for right click manipulation.   

Bug, or am I missing something?  LabVIEW 2019.

Link to comment
  • 1 year later...

I m facing the same issue. but in my case, I also got 2 "affected item" references the reference to the item I selected as well as the parent cluster. So I always prefer 2nd number of reference because first reference is of the parent cluster. But When I use single or multiple objects in cluster and perform right click on first object (order wise first )of cluster then I get "affected item" object reference on first number of affected items. And for other objects in cluster I get "affected item" object reference on last number of affected items.

Edited by Pipaliya Ritesh
Link to comment

This utility VI is helpful for filtering out only contained controls in a right-click Affected Items array.

[LabVIEW 20xx]\resource\plugins\PopupMenus\support\Filter For Contained Controls Only.vi

Many of the shipping right-click plugins use this VI for the exact purpose you describe... for example, check out the source code for the Change To Array Or Element plugin:

[LabVIEW 20xx]\resource\plugins\PopupMenus\edit time panel and diagram\Change To Array Or Element.llb\Change To Array Or Element.vi

  • Like 2
Link to comment
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.