Menu Strip

The MenuStrip control is a top-level container allowing a range of options to be provided in a menu structure on a form, using very little space. Items can be added to the control to represent menu commands for the application, or contain a range of sub-items, allowing for the creation of a hierarchical menu structure.

Menus can be placed on a form at the top or bottom, left or right of the form. You can define the width and height of menu items, as well as accelerator keys and icons. Additionally, you can add a common set of items to a MenuStrip with the Insert Standard Items option.

Properties

Key properties for the MenuStrip control include:

  • Items. Specifies the items that have been added to the MenuStrip control.

  • RenderMode. Determines the visual style for displaying the MenuStrip control.

Events

Events can be configured for the MenuStrip control using the properties in the Events pane. For example, an action can be configured for each item in the MenuStrip which determines what happens on selection, using the Click property.

For information on configuring events and other components of the design using a script, see: Working with Scripts.

Adding a MenuStrip

When you drag a MenuStrip control to a form in Flow Designer, a control will appear in the design space, and the menu will appear at the top of the active form. You can use the control properties to configure the layout and style settings for the menu, as well as Insert Standard Items and Edit Items.

These options are also available below the Properties panel for the control.

If you click the Insert Standard Items option, the MenuStrip control will be populated with a collection of common menu items for File, Edit, Tools and Help menus: 

These standard items, once added, can be edited or removed as required.

The Edit Items... option opens the Items Collection Editor form from which you can create and configure the menu items for your control.

Use the drop down at the top of the Items Collection Editor to select which item type you want to add and configure. For example, select the MenuItem option to add, delete and configure the menu items for your control.

You can add an instance of the selected item using the Add button at the right of the drop down list. This will add a new item to the bottom of the list in the panel at the left. You can change the order of the items in the list using the Up and Down buttons. Items can be removed from the list using the Delete button.

For each item on the menu control list, you can set the item properties, while it is selected, using the Properties pane on the right of the Items Collection Editor.

Information on the properties for various menu items can be found by searching for the item name on the Forms Help at Microsoft® Documentation. For example, information on ToolStripMenuItem can be found via the link.

When you have configured the control as required, click OK to return to the form.

The MenuStrip, as configured, will appear in the form for the user.

Information on the properties and events for the MenuStrip control can be viewed at the link to Microsoft® Documentation.