> For the complete documentation index, see [llms.txt](https://docs.servoy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.servoy.com/reference/servoycore/dev-api/solutionmodel/titlejustification.md).

# TITLEJUSTIFICATION

## Constants Summarized

| Type                                                     | Name                  | Summary                                                                                                                                                    |
| -------------------------------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [CENTER](#center)     | Position title text in the center of the border line.                                                                                                      |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [DEFAULT](#default)   | Default justification for the title text                                                                                                                   |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [LEADING](#leading)   | Position title text at the left side of the border line for left to right orientation, at the right side of the border line for right to left orientation. |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [LEFT](#left)         | Position title text at the left side of the border line.                                                                                                   |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [RIGHT](#right)       | Position title text at the right side of the border line.                                                                                                  |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [TRAILING](#trailing) | Position title text at the right side of the border line for left to right orientation, at the left side of the border line for right to left orientation. |

## Constants Detailed

### CENTER

Position title text in the center of the border line.

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createTitledBorder('Test',null,'#ff0000',SM_TITLEJUSTIFICATION.CENTER,SM_TITLEPOSITION.TOP);
```

### DEFAULT

Default justification for the title text

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createTitledBorder('Test',null,'#ff0000',SM_TITLEJUSTIFICATION.DEFAULT,SM_TITLEPOSITION.TOP);
```

### LEADING

Position title text at the left side of the border line\
for left to right orientation, at the right side of the\
border line for right to left orientation.

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createTitledBorder('Test',null,'#ff0000',SM_TITLEJUSTIFICATION.LEADING,SM_TITLEPOSITION.TOP);
```

### LEFT

Position title text at the left side of the border line.

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createTitledBorder('Test',null,'#ff0000',SM_TITLEJUSTIFICATION.LEFT,SM_TITLEPOSITION.TOP);
```

### RIGHT

Position title text at the right side of the border line.

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createTitledBorder('Test',null,'#ff0000',SM_TITLEJUSTIFICATION.RIGHT,SM_TITLEPOSITION.TOP);
```

### TRAILING

Position title text at the right side of the border line\
for left to right orientation, at the left side of the\
border line for right to left orientation.

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createTitledBorder('Test',null,'#ff0000',SM_TITLEJUSTIFICATION.TRAILING,SM_TITLEPOSITION.TOP);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.servoy.com/reference/servoycore/dev-api/solutionmodel/titlejustification.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.
