Jump to content

Programmatic access to a controls right click menu


viSci

Recommended Posts

Is there any way to automated the process of installing right click user menu items into a set of controls and indicators?

I thought it could be done with VI Scripting but have not found anything yet. Anybody have a suggestion?

Ok, just figured out that you can use the event structure to catch a right click activation event which contains a menu reference property.

From there you can install your custom menu items and then catch them right away in other event cases if clicked on.

Link to comment

Is there any way to automated the process of installing right click user menu items into a set of controls and indicators?

I thought it could be done with VI Scripting but have not found anything yet. Anybody have a suggestion?

Ok, just figured out that you can use the event structure to catch a right click activation event which contains a menu reference property.

From there you can install your custom menu items and then catch them right away in other event cases if clicked on.

Were you thinking something like this? {is a VI snippet for dropping into an 09 BD}

http://screencast.com/t/k0kAwTitY

post-208-125713692447_thumb.png

delme.vi

This code is intended to be run as an asynchronously running VI (IOW outside of any loop)

All this does is adds the control name to the right click menu, but really since now you can capture the menu activation and add to the list, the world is your oyster.

I'm really thinking some LVOOP could work wonders here.

(side note: as with any asynchronously running VI, the termination process is always a gotcha, but I'm sure you'll figure out an elegant way around that)

  • Like 1
Link to comment

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.