This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Simulink.dialog.Listbox class

Package: Simulink.dialog

Control listbox programmatically

Description

Use an instance of Simulink.dialog.ListBoxControl class to perform the following operations:

  • Get selected items from the listbox

  • Set selected items in the listbox

Properties

Name

Uniquely identifies the dialog control and is a required field.

Type: character vector

Prompt

Specifies the text displayed on the button dialog control.

Type: character vector

Default: empty

Type Options

Specifies the options shown in the listbox.

Type: cell array

Default: empty

Callback

Specifies the MATLAB® command (s) to be executed when the dialog control is invoked.

Type: character vector

Default: empty

Row

Specifies whether dialog control is placed on the current row or on a new row.

Type: character vector

Value: 'current'|'new'

Default: 'current'

Enabled

Indicates whether container is active on the mask dialog box.

Type: boolean

Value: 'on'|'off'

Default: 'on'

Visible

Indicates whether container is displayed on the mask dialog box.

Type: boolean

Value: 'on'|'off'

Default: 'on'

Multiselect

Indicates whether container is enabled for multiple selection.

Type: boolean

Value: 'on'|'off'

Default: 'on'

Methods

getSelectedItemsGet the values of selected items from a listbox
setSelectedItemsSet values for a listbox