Main Content

Menu

Create menu of commands for instrument panel UI

Description

example

hMenu = slrealtime.ui.container.Menu(hFigure) adds a menu to an existing menu or to a figure for an instrument panel uifigure figure. The menu commands include:

  • Select a target computer

  • Connect or disconnect a target computer

  • Load a real-time application on a target computer

  • Start or stop a real-time application running on a target computer

  • Update software on a target computer

For information about the slrealtime.ui.container.Menu component TargetSelector property, see slrealtime.ui Properties.

Examples

collapse all

Creates a menu of commands for the instrument panel.

% Create figure 
hFig = uifigure(); 
% Create hMenu 
hUIMenu = uimenu(hFig); 
% Create Menu component 
hSlrtTMenu = slrealtime.ui.container.Menu(hFig); 
hSlrtUIMenu = slrealtime.ui.container.Menu(hUIMenu, 'Name', 'mymenu');

Input Arguments

collapse all

The hFigure argument identifies the uifigure to which you are adding the UI component.

Example: hFig = uifigure()

Data Types: function_handle

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'Name', 'mymenu'

The Name name-value argument selects a name for the menu that you create.

Example: 'Name', 'mymenu'

Data Types: string

Output Arguments

collapse all

The hMenu argument is the handle to the menu component that you create.

Version History

Introduced in R2021b