# TITLEJUSTIFICATION

## Constants Summarized

| Type                                                                         | Name                  | Summary                                                                                                                                                    |
| ---------------------------------------------------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number) | [CENTER](#center)     | Position title text in the center of the border line.                                                                                                      |
| [Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number) | [DEFAULT](#default)   | Default justification for the title text                                                                                                                   |
| [Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number) | [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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number) | [LEFT](#left)         | Position title text at the left side of the border line.                                                                                                   |
| [Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number) | [RIGHT](#right)       | Position title text at the right side of the border line.                                                                                                  |
| [Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number) | [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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number)

**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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number)

**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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number)

**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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number)

**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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number)

**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](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number)

**Sample**

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