Main Content

addColumn

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

Add new column in the custom table

Syntax

tableControl.addColumn(Name=Value)

Description

tableControl.addColumn(Name=Value) adds a column with the specified properties in the custom table.

Input Arguments

expand all

Handle to the custom table, specified as an object. You can use the getDialogControl command to get the custom table handle. 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.

Data Types: char vector | cell array

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.

Example: tableControl.addColumn(Name='HDL Name',Type='edit');

Name of the column, specified as a string or character vector.

Example: Name='HDL Name'

Data Types: char | string

The type of data that the column contains, specified as edit or checkbox or popup.

Example: Type='popup'

Data Types: char | string

Option to edit the column, specified as a string.

Example: Enabled='on'

Data Types: char | string

Option to control the visibility of the column, specified as a string.

Example: Visible='on'

Data Types: char | string

Initial width of the column, specified as an integer.

Example: Width=2

Data Types: char | string

Option to evaluate the MATLAB expression in the column, specified as a string. Enabling this options stores the evaluated value of the expression in the column otherwise the literal value is stored.

Example: Evaluate='on'

Data Types: char | string

The options that are displayed within a popup, specified as a cell array.

Data Types: cell

Examples

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

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

% Add column.
tableControl.addColumn(Name='HDL Name',Type='edit'); 

Version History

Introduced in R2019a