Main Content

slToolstripDeveloperMode

Enable developer mode for Simulink Toolstrip

Since R2021b

Description

tf = slToolstripDeveloperMode(status) enables a developer mode that lets you get action and icon names for controls, such as push buttons, in the Simulink® Toolstrip. You can use the action name to add a control that performs the same action to a custom tab. For an example, see Specify Built-In Simulink Actions. You can use the icon name to add a control that has the same icon to a custom tab. For an example, see Define Custom Actions.

To activate developer mode, set status to 'on'. Then, click anywhere on the Simulink Toolstrip.

If you click away from the Simulink Toolstrip, developer mode is temporarily deactivated. To reactivate developer mode, click anywhere on the Simulink Toolstrip.

When developer mode is active, to display the action and icon names in the MATLAB® Command Window, pause on the control in the Simulink Toolstrip and press Ctrl. On a Mac, press command (⌘) instead of Ctrl.

example

Examples

collapse all

In the MATLAB Command Window, enable developer mode for the Simulink Toolstrip.

slToolstripDeveloperMode('on')
ans =

  logical

   0

The function enables developer mode for the Simulink Toolstrip. The returned value indicates that developer mode was not enabled before you entered this command.

To activate developer mode, click anywhere on the Simulink Toolstrip.

On the Simulink Toolstrip, pause your pointer on a control. For example, pause on the Library Browser button.

Press Ctrl. The output in the MATLAB Command Window shows the shows the action and icon names for the button.

Action: showLibraryBrowserELBAction
Icon: libraryBrowser
-------------------

Input Arguments

collapse all

Desired status of developer mode, specified as specified as 'on' or 'off', or as numeric or logical 1 (true) or 0 (false). A value of 'on' is equivalent to true, and 'off' is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

By default, developer mode for the Simulink Toolstrip is disabled. Enable developer mode when you want to get the action and icon names of items in the Simulink Toolstrip.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char

Output Arguments

collapse all

Previous status of developer mode, returned as a 1 or 0 of data type logical.

Version History

Introduced in R2021b