Main Content

insertColumn

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

Insert a column at a specific position in the custom table

Syntax

tableControl.insertColumn(columnIndex[Name,Value])

Description

tableControl.insertColumn(columnIndex[Name,Value]) inserts a column with the specified properties at a specified index in a 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 Simulink.dialog.Container.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.

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 (default), checkbox, popup.

The options that are displayed within a popup control or in a promoted parameter. This field is a cell array.

Option to specify whether the user can set parameter value.

Examples

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

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

% Insert a column at the fifth position.
tableControl.insertColumn(5,'Name', 'HDL Name', 'Type', 'edit'); 

Version History

Introduced in R2019a