Main Content

Simulink.dialog.ListboxControl Class

Namespace: Simulink.dialog
Superclasses: Simulink.dialog.Control

Control list box programmatically

Description

The Simulink.dialog.ListBoxControl class is a handle class that enables you to perform the following operations:

  • Get selected items from the list box.

  • Set selected items in the list box.

The Simulink.dialog.ListboxControl class is a handle class.

Properties

expand all

Identifier of the list box dialog control, specified as a string scalar or character vector.

Example: 'Parameter1'

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: char | string

Display text of the list box dialog control, specified as a string scalar or character vector.

Example: 'Signal Types'

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: char | string

Placement of list box dialog control, specified as 'new' or 'current'.

  • 'new' — Place the list box dialog control in a new row on the mask dialog box.

  • 'current' — Place the list box dialog control in the same row as the previous dialog control on the mask dialog box.

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: char | string

Option to edit the parameters in the mask dialog box, specified as 'on' or 'off'.

  • 'on' — You can select the options in the list box dialog control on a mask dialog box.

  • 'off' — You cannot select the options in the list box dialog control on a mask dialog box.

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: logical

Option to display the list box on the mask dialog box, specified as 'on' or 'off'.

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: logical

Option to control the horizontal stretch of the list box dialog control when you resize the mask dialog box, specified as 'on' or 'off'.

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: logical

Informative message that appears when you point to an instance of the list box dialog control, specified as a string scalar or character vector.

Example: 'Select correct options'

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: char | string

Selection of multiple values, specified as 'on' or 'off'.

  • 'on' — You can select multiple values in the list box list.

  • 'off' — You cannot select multiple values in the list box list.

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: logical

List of options shown in the list box, specified as a cell array.

Example: Analog Signal, Digital Signal

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: cell

MATLAB code executed when you select the list box options, specified as a character vector.

Attributes:

GetAccess
public
SetAccess
public
GetObservable
true
SetObservable
true

Data Types: char

Methods

expand all

Alternatives

You can manage a list box dialog control using the Property editor in the Mask Editor dialog box. For more information, see Property editor.

Version History

Introduced in R2019a