LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new menu options to the interactive graph legend popup menu

I'm currently using CVI 8.0.1 and have a graph legend with the interactive option set.  This enables a built-in menu where you can change pretty much any visual option of a plot, but I would like to add a couple of items to the menu,  namely a "delete plot" option.  Is there a way to add items to the built-in popup, or are we able to edit the code that handles this feature?

As this menu is already built and controled, I would prefer not to have to make one of my own to add a few items.

Thanks.
0 Kudos
Message 1 of 4
(3,277 Views)

Hi gtoph,

I have been experimenting with this idea after you posted. The problem is that we have no way of directly referencing the menu or the legend that uses it with the menu functions in CVI. Only the tree and table controls support this type of manipulation.

As you said, you could create your own right-click menu for any control from scratch. We have a simple example on our website here:

Creating Right-Click Menus for LabWindows/CVI Controls|
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=0BE751D3DDC51ABCE0440003BA7CCD71&p_...

Thanks,

Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 2 of 4
(3,257 Views)
Charlie,

Thanks for replying, I was afraid the answer wouldn't be easy. 🙂   I've implement other right click menu's so I'm familiar with the basics, I was just hopeing that I wouldn't have to reinvent the wheel so to speak.  Since there are very few legend access functions I would assume that to determine which item in the legend the user clicked on I'll have to do a little math with the current mouse position and the top of the legend? 

I would also think I'm not the first to request this feature (thought I didn't really see another other posts).  Do you know if anything is in the works to allow this (say for release 8.0.2 🙂 )?  Seems to be a rather simple feature to add since we can already do it for tables and trees?

Thanks.
0 Kudos
Message 3 of 4
(3,255 Views)
Hi gtoph,
 
I think this merits a product suggestion. We always welcome feedback from our CVI users, and we are always looking to improve our products. You can submit feedback of this type through our website here:
 
 
There's a "Product Feedback" section in the lower-left corner of the page.
 
I think you are on the right track with your mouse coordinate math idea. You can catch a right-click event for your entire graph -- this extends to the legend as well. If you only want the menu to appear when you right-click the legend, you'll have to do some math. Or perhaps you want it to appear anywhere on the graph, since you have to customize it anyway.
 
Just a thought,
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 4 of 4
(3,236 Views)