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
Name
— Identifier of list box dialog control
'Parameter'
(default) | string scalar | character vector
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
Prompt
— Display text of list box dialog control
string scalar | character vector
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
Row
— Placement of list box dialog control
'new'
(default) | 'current'
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
Enabled
— Option to edit parameters in mask dialog box
'on'
(default) | 'off'
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
Visible
— Option to display list box on mask dialog box
'on'
(default) | 'off'
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
HorizontalStretch
— Option to control horizontal stretch of list box dialog control
'on'
(default) | 'off'
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
Tooltip
— Informative message
string scalar | character vector
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
Multiselect
— Selection of multiple values
'on'
(default) | 'off'
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
Type Options
— List of options
cell array
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
Callback
— MATLAB® code executed when you select list box options
character vector
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
Public Methods
getSelectedItems | Get the values of selected items from a list box |
setSelectedItems | Set values for a list box |
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
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)