Main Content

slEditToolstripIcon

Open file that defines custom Simulink Toolstrip icon

Since R2021b

Description

slEditToolstripIcon(icon) opens the file that defines the specified custom toolstrip icon.

example

Examples

collapse all

Suppose you have many JSON files that define icons for a custom tab in a toolstrip component named custom.

To open the file that defines a custom icon, such as myIcon, use the slEditToolstripIcon function.

slEditToolstripIcon("custom:myIcon");

Input Arguments

collapse all

Fully qualified icon name, specified as a character vector or string scalar. The fully qualified name is the name of the toolstrip component followed by a colon and the full path to the icon within the toolstrip component.

When an icon is defined at the top level of a toolstrip component, the fully qualified icon name consists of these parts:

  1. Name of the toolstrip component followed by a colon

  2. Icon ID

When an icon is defined in the JSON object for a top-level action, the fully qualified icon name consists of these parts:

  1. Name of the toolstrip component followed by a colon

  2. Action ID

When an icon is defined in the JSON object for a nested action, the fully qualified icon name consists of these parts:

  1. Name of the toolstrip component followed by a colon

  2. Tab ID followed by a forward slash

  3. Section ID or index followed by a forward slash

  4. Column ID or index followed by a forward slash

  5. Control ID or index

Example: slEditToolstripIcon("custom:myIcon") opens the file that defines myIcon for the custom toolstrip component.

Example: slEditToolstripIcon("custom:customTab/2/1/3") opens the file that defines the icon for the third control in the first column of the second section on the tab named customTab in the custom toolstrip component.

Data Types: char | string

Version History

Introduced in R2021b