Main Content

getDialogControls

Class: Simulink.Mask
Namespace: Simulink

Retrieve root level containers from a masked block

Since R2022b

Description

maskObj.getDialogControls returns all the containers at the root level from a masked block. You can iterate over the root level control to retrieve all the containers at the child levels.

example

Examples

expand all

Get the mask obj

maskObj = Simulink.Mask.get(gcb)

Get the dialog controls at root level

controls = maskObj.getDialogControls
controls = 

  1×2 Group array with properties:

    Name
    Prompt
    Row
    Enabled
    Visible
    AlignPrompts
    DialogControls
    Tooltip

Iterate over the root level control

 controls(2)
ans = 

  Group with properties:

              Name: 'ParameterGroupVar'
            Prompt: 'Parameters'
               Row: 'new'
           Enabled: 'on'
           Visible: 'on'
      AlignPrompts: 'off'
    DialogControls: [1×2 Simulink.dialog.parameter.Control]
           Tooltip: ''

Version History

Introduced in R2022b