LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
jacemdom

Controls and indicators contextual menu

Status: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.

Add the ability to configure a contextual menu when a user right-clicks a control or an indicator. Configurable in the properties of the objects and available triggers for the event structure.
9 Comments
jlokanis
Active Participant

Maybe I misunderstand your request, but I am pretty sure you can already do this.

run time menu.jpg

 

run time menu events.jpg 

-John
------------------------
Certified LabVIEW Architect
jacemdom
Active Participant

Precision added... 

 

Add the ability to configure programmatically a contextual menu when a user right-clicks a control or an indicator. Configurable in the properties of the objects and available triggers for the event structure.

jlokanis
Active Participant

Like I said above, this is already available.  By using the 'Activation?' event to trap the right click, you can build any menu you want on the fly and then allow the user to select from it.  The 'Selection (User)' event will then fire and tell you what they chose so you can take the appropriate action.  I have attached images from a simple example VI to demonstrate this.

 custom menu example front panel.jpg

 

custom menu example BD1.jpg

 

custom menu example BD2.jpg

 

custom menu example BD3.jpg 

Message Edited by jlokanis on 10-20-2009 10:34 AM
-John
------------------------
Certified LabVIEW Architect
jacemdom
Active Participant

Do you know in what version this was added? I have used home grown submenu tools for so long that i never bothered to check until now.

 

Do you know if it is possible to complete eliminate the default items in the submenu? I did not find a way to do so.

 

sss.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

If not then i would add another precision :

 

Add the ability to completely configure programmatically a contextual menu when a user right-clicks a control or an indicator without the deafult items. Configurable in the properties of the objects and available triggers for the event structure.

 

waldemar.hersacher
Active Participant
Custom runtime menues was introduced with LV 8.0. You can do the same thing as with the VI menu, having all, parts or none of the default items.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
jacemdom
Active Participant

Thanks..after allowing myself to explore adequately i figured out the workings...

 

Thanks. 🙂

jacemdom
Active Participant

Is it possible to trigger the contextual menu with a left click?

tst
Knight of NI Knight of NI
Knight of NI

> Is it possible to trigger the contextual menu with a left click?

 

If you use the Mouse Down? event (note the ?, it's important), you can change the event data so that the button is 2 (the right button). This will basically change the left click to a right click.


___________________
Try to take over the world!
Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.