LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamically enable or disable a control's runtime shortcut menu?

Is there a way to do it?  

 

I need to disable a control's runtime menu while my VI is running and then enable it at other point of time.  All the way, I can make use of the default menu items (Reinitialize to default values, Copy data etc..,) for the control and I don't have any customized menu items.

--
Ajay MV


0 Kudos
Message 1 of 6
(3,044 Views)

Hi Ajay,

 

as a quick & dirty way you could use a filter event for mouse clicks. When you want to disable the right-click menu you filter the right-click mouse events…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(3,036 Views)

Register for the control's "Shortcut Menu Activation?" filter Event and selectively discard it.

0 Kudos
Message 3 of 6
(3,025 Views)

 


@drjdpowell wrote:

Register for the control's "Shortcut Menu Activation?" filter Event and selectively discard it.



Thanks for the reply.  That will give a bad impression for the end user.  He/she may think like my application doesn't reponse to the available options.  I specifically want to greyout selective options.

--
Ajay MV


0 Kudos
Message 4 of 6
(2,940 Views)

@GerdW wrote:

Hi Ajay,

 

as a quick & dirty way you could use a filter event for mouse clicks. When you want to disable the right-click menu you filter the right-click mouse events…


Smiley Very Happy  Thats nice dirty idea.  But it might give my end-user an impression that my application doesn't respond to the given options.  I specifically want to greyout the right-click menu.

 

Thanks,

Ajay.

--
Ajay MV


0 Kudos
Message 5 of 6
(2,937 Views)

You can dynamically load different run time short cut menus. ( I use if for language changes)

Maybe you could have your normal menu, and then load an empty menu when you want to get rid of the menu.

 

Edit: oops, didnt read the question!

 

0 Kudos
Message 6 of 6
(2,931 Views)