Main Content


Font properties for transition labels


    Use a Stateflow.TransFont object to specify the font properties for transition labels in a chart.


    Each chart has its own Stateflow.TransFont object. To access the Stateflow.TransFont object, use the TransitionFont property for the Stateflow.Chart object.


    expand all

    Stateflow® API objects have properties that correspond to the values you set in the Stateflow Editor. To access or modify a property, use dot notation. To access or modify multiple properties for multiple API objects, use the get and set functions, respectively. For more information, see Modify Properties and Call Functions of Stateflow Objects.

    Font name, specified as a string scalar or character vector.

    Font angle, specified as "NORMAL" or "ITALIC".

    Font weight, specified as "NORMAL" or "BOLD".

    Default font size for new transitions in the chart, specified as a scalar.


    collapse all

    Access the Stateflow.TransFont object for the Stateflow.Chart object ch.

    font = ch.TransitionFont;

    Set the font for transition labels to Arial. Set the font angle to italics and the font weight to bold. Set the default font size to 8.

    font.Name = "Arial";
    font.Angle = "ITALIC";
    font.Weight = "BOLD";
    font.Size = 8;

    Version History

    Introduced before R2006a