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 comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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.

Introduced in R2021b