Main Content

ParameterTable

Create parameter table for instrument panel UI

Description

example

hParamTable = slrealtime.ui.control.ParameterTable(hFigure) creates an editable parameter table display for an instrument panel uifigure figure. The display shows the tunable parameters that have been selected for streaming in the real-time application. When the instrument panel app is running, the ParameterTable component provides a right-click menu that lets you select parameters to add to or remove from the display.

For information about display properties, see slrealtime.ui Properties.

Examples

collapse all

Create a parameter table and adjust the position of the table. When using workspace variables in the Parameters property, the BlockPath is empty for the workspace variable, and the ParameterName value is the name of the workspace variable.

hFig = uifigure(); 
% Create parameter table component 
hPTable = slrealtime.ui.control.ParameterTable(hFig); 
hPTable.Parameters = struct( ... 
  'BlockPath', {'testmodel/Constant1', '', ...
         'testmodel/Constant5', '', ... 
         'testmodel/str1', 'testmodel/str2', ...
         'testmodel/multi-line block name', ... 
         'testmodel/Constant6'}, ... 
  'ParameterName', {'Value', 'model_wksp_var', ...
           'Value', 'base_wksp_var', 'String', ... 
           'String', 'Value', 'Value'}); 
% Change position of the component 
hPTable.Position = [0 0 200 200]; 
% Customize 
hPTable.TableBackgroundColor = [0 0 1]; % 'blue' 
hPTable.TableForegroundColor = [1 1 0]; % 'yellow'

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

Output Arguments

collapse all

The hParamTable argument is the handle to the parameter table component that you create.

Version History

Introduced in R2021b

expand all