Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Adding Menu Bars to Your Project

4 ratings | 1.00 out of 5
Print
You can add Menus to your application with LabWindows/CVI. The entire menu associated with a panel is called a Menu Bar. For example, this consists of the File, Edit, Build, Window and Help. A Menu is one element of the Menu Bar. The File menu is an example of a menu on a Menu Bar. A Menu Item is the command you select from the menu, for instance, Open from the File menu.

A Menu Bar has a constant name, which is inherited by all the Menus and Menu Items you placed to that Menu Bar.

To create menus, open the User Interface editor and select Create»Menu Bar. The Edit Menu dialog box appears.

The Edit Menu Bar dialog box contains the following items :
    • Menu Bar Constant Prefix—This is the constant name that is associated with the Menu bar. This is similar to the constant name that is associated with a Panel
    • Item—This is the text that is shown in the Menu Bar (like File, Edit, Window, Help etc.)
    • Constant Name—This is the unique name that identifies this menu item on the Menu Bar.
    • Callback Function—This is the callback function that is used to respond to a user clicking one of the Menu Items.
    • Modifier Key and Shortcut Key—These specify the hot key combination that are used to access the Menu Item.
    • The <<< and >>> buttons—These are used to position the menu items in the menu hierarchy. For example, to create a File menu with Open and Exit as two of the items under it. Put File in the first column and then Open and Exit tabbed in under it , by using the >>> button.


4 ratings | 1.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).