| Using Simulink | ![]() |
Creating Dynamic Dialogs for Masked Blocks
Simulink allows you to create dialogs for masked blocks whose appearance changes in response to user input. Features of masked dialog boxes that can change in this way include
Changing a parameter can cause the control for another parameter to appear or disappear. The dialog expands or shrinks when a control appears or disappears, respectively.
Changing a parameter can cause the control for another parameter to be enabled or disabled for input. Simulink grays a disabled control to indicate visually that it is disabled.
Creating a dynamic masked dialog entails using the mask editor in combination with the set_param command. Specifically, you use the mask editor to define the dialog's parameters, both static and dynamic. For each dynamic parameter, you enter a callback function that defines the dialog's response to changes to that parameter (see Callback). The callback function can in turn use the set_param command to set mask dialog parameters that affect the appearance and settings of other controls on the dialog (see next section). Finally, you save the model or library containing the masked subsystem to complete the creation of the dynamic masked dialog.
| Linking Mask Parameters to Block Parameters | Setting Masked Block Dialog Parameters | ![]() |
© 1994-2005 The MathWorks, Inc.