LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Any ideas on creating contextmenus for use with LabWindows?

I want to be able to right click on an object and have a custom menu popup.
0 Kudos
Message 1 of 3
(3,033 Views)
You can use the RunPopupMenu function (found in the User Interface library) to display a right-click context menu.

To use it in your program you can create a callback function for your panel and in its EVENT_RIGHT_CLICK event handler case call this function to display the context menu.

Now, the thing about the RunPopupMenu function is that it actually displays items found within a "menu-bar" designed within the CVI User Interface Editor. So make sure that you design a menu-bar first, and then reference it in the RunPopupMenu function.

I have attached an example project that illustrates a simple right-click context menu's use.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
Message 2 of 3
(3,033 Views)
Thanks so much.
0 Kudos
Message 3 of 3
(3,033 Views)