# Formatting Elements

## Change Font

To change font face, size, and color of view elements:

1. Select view elements in diagram.
2. Show **Font Dialog** by pressing `Ctrl+Shift+F` or selecting **Format | Font...** in Menu Bar or Context Menu.
3. Select font face, size or color and press **OK** button.

![Font Dialog](/files/JzqnIB2hn2jOkfKY8ueQ)

You can also use **Style Editor** to change Font face, size, and color.

## Change Line Color

To change line color of view elements:

1. Select view elements in diagram.
2. Show **Color Dialog** for line color by pressing `Ctrl+Shift+L` or selecting **Format | Line Color...** in Menu Bar or Context Menu.
3. Select line color and press **OK** button.

![Color Dialog](/files/0vjYxhYF9TnIK39RkRYy)

You can also use **Style Editor** to change line color.

## Change Fill Color

To change fill color of view elements:

1. Select view elements in diagram.
2. Show **Color Dialog** for fill color by pressing `Ctrl+Shift+I` or selecting **Format | Fill Color...** in Menu Bar or Context Menu.
3. Select fill color and press **OK** button.

You can also use **Style Editor** to change fill color.

## Change Line Style

![](/files/-LAqLiBegC04kXn6TiwJ)

To change line style of view elements:

1. Select view elements in diagram.
2. Select one of line styles.
   * Rectilinear - Press `Ctrl+L` or select **Format | Line Style | Rectilinear** in Menu Bar or Context Menu.
   * Oblique - Press `Ctrl+B` or select **Format | Line Style | Oblique** in Menu Bar or Context Menu.
   * RoundRect - Press `Ctrl+Alt+L` or select **Format | Line Style | RoundRect** in Menu Bar or Context Menu.
   * Curve - Press `Ctrl+Alt+B` or select **Format | Line Style | Curve** in Menu Bar or Context Menu.

You can also use **Style Editor** to line style.

## Set Auto Resize

To set view elements always resize automatically:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+R` or check (or uncheck) **Format | Auto Resize** in Menu Bar or Context Menu.

You can also use **Style Editor** to line style.

## Set Inherit Style

Typically the style (font, color, etc.) of attributes and operations is inherited from the class view. If you want to set different style of some attributes or operations from the class, turn off the inherit style property.

To set inherit style of view elements:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+K` or check (or uncheck) **Format | Inherit Style** in Menu Bar or Context Menu.

You can also use **Style Editor** to line style.

## Set Word Wrap

To allow text can be shown in multiple lines:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+W` or check (or uncheck) **Format | Word Wrap** in Menu Bar or Context Menu.

## Stereotype Display

An element has six alternative representations based on the stereotype. To change stereotype display:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+0` \~ `Ctrl+Shift+5` or select **Format | Stereotype Display | \[StereotypeDisplayKind]** in Menu Bar or Context Menu.

Supported stereotype display kinds are follow:

* None (`Ctrl+Shift+0`) : Do not show stereotype.
* Label (`Ctrl+Shift+1`) : Show stereotype as a label.
* Decoration (`Ctrl+Shift+2`) : Show stereotype as a decorated icon on the top left.
* Decoration with Label (`Ctrl+Shift+3`) : Show stereotype as a label with a decorated icon.
* Icon (`Ctrl+Shift+4`) : Show element as a icon.
* Icon with Label (`Ctrl+Shift+5`) : Show element as a icon with label.

![](/files/-LAqLiSpqhEoxer85Lm0)

## Show Visibility

To show (or hide) visibilities:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+V` or check (or uncheck) **Format | Show Visibility** in Menu Bar or Context Menu.

## Show Namespace

To show (or hide) namespace:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+N` or check (or uncheck) **Format | Show Namespace** in Menu Bar or Context Menu.

## Show Property (Tag)

To show (or hide) properties (tags):

1. Select view elements in diagram.
2. Press `Ctrl+Shift+P` or check (or uncheck) **Format | Show Property** in Menu Bar or Context Menu.

## Show Type

To show (or hide) types:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+Y` or check (or uncheck) **Format | Show Type** in Menu Bar or Context Menu.

## Show Multiplicity

To show (or hide) multiplicities:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+M` or check (or uncheck) **Format | Show Multiplicity** in Menu Bar or Context Menu.

## Show Operation Signature

To show (or hide) operation signature:

1. Select view elements in diagram.
2. Press `Ctrl+Shift+G` or check (or uncheck) **Format | Show Operation Signature** in Menu Bar or Context Menu.

## Suppress Attributes

To suppress attributes:

1. Select view elements (e.g. Class) in diagram.
2. Press `Ctrl+Shift+A` or check (or uncheck) **Format | Suppress Attributes** in Menu Bar or Context Menu.

## Suppress Operations

To suppress operations:

1. Select view elements (e.g. Class) in diagram.
2. Press `Ctrl+Shift+O` or check (or uncheck) **Format | Suppress Operations** in Menu Bar or Context Menu.

## Suppress Receptions

To suppress receptions:

1. Select view elements (e.g. Class) in diagram.
2. Press `Ctrl+Shift+E` or check (or uncheck) **Format | Suppress Receptions** in Menu Bar or Context Menu.

## Suppress Literals

To suppress literals:

1. Select Enumeration view elements in diagram.
2. Press `Ctrl+Shift+T` or check (or uncheck) **Format | Suppress Literals** in Menu Bar or Context Menu.

## Suppress Columns

To suppress columns:

1. Select Entity view elements in diagram.
2. Press `Ctrl+Shift+U` or check (or uncheck) **Format | Suppress Columns** in Menu Bar or Context Menu.

## Aligning View Elements

To bring view elements on the front:

1. Select view elements in diagram.
2. Select **Format | Alignment | Bring to Front** in Menu Bar or **Alignment | Bring to Front** in Context Menu.

Or, to send view elements to the back:

1. Select view elements in diagram.
2. Select **Format | Alignment | Send to Back** in Menu Bar or **Alignment | Send to Back** in Context Menu.

And, you can align two or more view elements:

1. Select view elements in diagram.
2. Select **Format | Alignment | \[AlignmentKind]** in Menu Bar or **Alignment | \[AlignmentKind]** in Context Menu.
   * Align Left : Align selected view elements to the left.
   * Align Right : Align selected view elements to the right.
   * Align Middle : Center selected view elements horizontally.
   * Align Top : Align selected view elements to the top.
   * Align Bottom : Align selected view elements to the bottom.
   * Align Center : Center selected view elements vertically.

## Layout Diagram

To layout diagram automatically:

1. Open the diagram to be layout.
2. Select **Format | Layout | Auto** in Menu Bar.

If you want to layout diagram in a particular direction:

1. Open the diagram to be layout.
2. Select **Format | Layout | \[Direction]** in Menu Bar. Supported directions are **Top to Bottom**, **Bottom to Top**, **Left to Right** and **Right to Left**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.staruml.io/user-guide/formatting-diagram.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
