LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to customize the context menu in the plot legend of the waveform chart?

Solved!
Go to solution

I am currently on creating a simulation of various control loops für educational purposes. There I have a Waveform Chart for the different Signals. Now my question, how can I customize the context menu in the plot legend of the Waveform Chart => when I click on the "image" behind the Plotnames a menu of options opens where you can customize the plotwidth or color etc. But the students shouldn't have access to these settings. How can I modify or disable this menu? The context menu for the waveform chart I've already customized by click right on Waveform Chart => Advanced => context menu, but for the plot legend I didn't find this setting...

 

Thanks for your Answers... I tried different things but I can't see a solution at the moment 😞

 

Cheers

Fads

0 Kudos
Message 1 of 8
(6,278 Views)

Has anybody an idea how I can solve this Problem...? If not I have to finish my Project without this... 😞

 

Fads

0 Kudos
Message 2 of 8
(6,256 Views)

Hi Fads,

 

you can customize the run time menu under: Right Click Chart -> Advanced -> Run Time Shortcut Menu -> Edit. If you do not want that the students access the menu you can simply disable it.

Have a short look at the attached screenshot.

 

Cheers

0 Kudos
Message 3 of 8
(6,222 Views)

Hi

 

One idea, as suggested, is to disable the run time menu.

This will disable the entire menu, not just that on the plot legend.

 

Instead, if you want to keep certain menu items like 'Clear Chart', 'Autoscale X' etc on the chart, then do the following:

 

1. In the image given by 'phips', instead of 'disable', click 'edit'. you will see a small window open.

2. in that window, select the pull down menu that shows 'Default' and select 'custom'.

 

3. then, you will see 'item type' selection. pull down the menu and select 'application item -> Autoscale X', etc

4. to add more items, click on the 'blue colored +' symbol on the top left of the window and repeat step 3.

5. to remove the item you have red colored 'x'.

 

save the menu with the control. you will get this option when you click 'save'.

 

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 4 of 8
(6,218 Views)
Solution
Accepted by topic author fads

Hi fads,


There have been a number of suggestions from others to edit or disable the chart right-click menu, but I see that this doesn't affect the legend right-click menu, which is what you are asking for assistance with.

 

To completely prevent the right-click menu from working, you need to disable the graph control entirely. You can do this by right-clicking the graph and selecting Advanced > Enabled State > Disabled. This will prevent the operator from being able to generate any right-click menus on the chart control.

 

If however you still wanted the chart right-click menu to work, but the legend right-click menu to be disabled, I can think of a couple of options:

1. Draw a classic square decoration over the legend and colour it transparent. This will prevent any mouse clicks from reaching the legend, and being transparent it will not interfere with your user interface appearance.

2. Use an Event Structure to capture the filter event ShortCut Menu Activation?  for the graph control. You can then use the Coords property to determine if the mouse is over the legend or not. If it is, send True to the Discard? right-hand terminal. This will deny the right-click menu when the operator right-clicks on the plot legend.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 5 of 8
(6,213 Views)

Hello together!

Thanks very much for your help! Yes thats a good Idea with the decoration! I didn't know, that I can colour a square transparent.

I had tryed to filter the Event Structure, but I had had the problem, that the Frontpanel was locked during the Event Structure is active and the Event Structure for the context-menu should always be active...

 

0 Kudos
Message 6 of 8
(6,194 Views)

But it is OK now! Thanks very much for your help and have a nice weekend!

Sincerly

Fads

0 Kudos
Message 7 of 8
(6,192 Views)

I'm glad you got it sorted in the end Smiley Happy

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 8 of 8
(6,187 Views)