09-29-2010 03:46 AM
Hello guys.
It is possible to deacitvate "insert element before / remove element" function appears after right-click on a array in the frontpanel?
"Description and Tip" should stay.
Thank you.
Alex
Solved! Go to Solution.
09-29-2010 03:56 AM
What do you mean explain with example. or explain properly....
<<Kudos are welcome>>
09-29-2010 06:27 AM
In the program I use arrays, where the user can fill in different information
(for example a 1D-String array with different names)
the problem is, that the user can click on the array in frontpanel (right mouse button) and delete or add an or more elements
and the program would work in this case not correctly.
I know, the "normal" user would't do it, but, who knows 😄 😄
Thanks.
09-29-2010 06:44 AM
Open the VI properties (Ctrl + I). Goto window appearence category & uncheck the "Allow default run-time shortcut menus" option.
-Kumar.B
09-29-2010 10:30 AM
Thank you for your solution,
unfortunatly the "description and tip" will not work in this case
but I need it, because the user can read then, what exactly the buttons do.
Cheers
09-29-2010 12:49 PM
A couple of thoughts. First, have you considered a cluster for the Front Panel Control if the number of elements is fixed? On the Block Diagram you can drop a Cluster to Array and carry on exactly as you did before.
As an alternative, you can create an Event Structure and add the ShortcutMenuSelection(app)? event for the array control (spelling is from memory, but definitely choose the filter event with the '?'). The ItemTag event terminal will have a string with the selected menu item, feed this into a case structure and for the two cases Insert and Delete wire a True constant out to the Discard Terminal of the Event Structure. You will need to use a probe or temporary indicator to get the proper tags. I am not a huge fan of this solution, it is relatively simple and effective, but it is a bit annoying to have a selection available to you and not be able to use it (IMO). You could add a 'ding' or flash a message when the user tries this if you like.
09-29-2010 02:20 PM
You can customize the right-click shortcut menu to remove some application items and keep others:
Right-click on the array (and not on the array element!) in the front panel and select Advanced->Run-Time Shortcut Menu->Edit...
This brings up the Shortcut Menu Editor:
Change the drop-down control from "Default" to "Custom".
Select the "???" line in the tree control on the left.
on the right, change the Item Type from "User Item" to "Application Item -> Description and Tip..."
It will automatically fill in the corrent Name and Tag.
Save the rtm either into its own file or into the control.
LV will automatically handle application items in the control, no event case needed.
I sometimes find the "Copy entire menu" function of the shortcut menu pretty useful if I only want to disable a few items.
http://zone.ni.com/reference/en-XX/help/371361G-01/lvconcepts/customizing_vis/#Customizing_Menus
09-29-2010 03:38 PM
09-30-2010 02:56 AM
Thank you guys for your time and solutions.
A special thank @blawson
it is exactly, what I wanted.
Cheers: Alex
02-16-2012 01:20 PM
Hello all,
Darin brings up a sore point I'm also wondering about: the run-time right-click menu for array elements is different than the one for full arrays, and I haven't been able to figure out how to edit the array element run-time menu (during development, array elements do not have customizable right-click menus accesible via Advanced/). For example, if you right-click on an element during run-time, you get a menu that includes insert/delete row and insert/delete column. If you right-click on the array index or boundary, you get a menu that includes empty array, show selection, etc. In my program users do not see the index or boundary and only right-click on the array elements (I don't want them to see the full array menu, most of which is very confusing). I would like to keep insert/delete row, but hide insert/delete column. If I try to customize the menu, the only application items available are those from the full array menu which do not include array element insert/delete operations. Sure, I could create a completely custom menu and handle these operations on my own, but it would surely be nicer to have them handled by LabView, since they are already in there somewhere... if we could just get to them.
best,
Dan