Main Content

setTableCell

Class: Simulink.dialog.parameter.CustomTable
Namespace: Simulink.dialog.parameter

Set properties of custom table cell

Syntax

tableCell = tableControl.setTableCell([rowIdx colIdx],Type,customtable,Evaluate,off)

Description

tableCell = tableControl.setTableCell([rowIdx colIdx],Type,customtable,Evaluate,off) sets the specified properties of a cell in a custom table.

Input Arguments

expand all

Custom table, specified as a custom table object. You can use the getDialogControl function to get the custom table object. For more information, see getDialogControl.

Consider, for example, tableControl = maskObj.getDialogControl(TableName). Here, maskObj is the mask object and TableName is the name of the custom table.

Row index number of the custom table cell for which the value is being fetched.

For example, 3.

Column index number of the custom table cell for which the value is being fetched.

For example, 5.

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.

Type of control that is used to specify the value of this parameter. The permitted values are: edit, checkbox, popup, combobox, listbox, radiobutton, slider, dial, spinbox, unit, textarea, breakpoint, customtable, tree, unit, min, max.

The value for the cell is specified. It depends on the Type of the parameter.

Examples

% Get block mask handle.
maskObj = Simulink.Mask.get(gcb); 

% Get custom table handle.
tableControl = maskObj.getDialogControl('myTable');

% Set cell properties.
tableControl.setTableCell([2 2], 'Type','edit','Value','1024'); 

Version History

Introduced in R2019a