# CaretWidth Property

> Returns or sets the caret width in pixels, separately for standard text (0) and marked text fields (1); zero is the system default, 255 the maximum.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > CaretWidth Property
- **273 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/caretwidth-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/caretwidth-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/caretwidth-property/llms-full.txt

---

This property returns or sets the width of the caret in pixels. Text Control supports different settings for the caret in marked text fields and in standard text. A width value of zero indicates the default setting which is the system-defined window-border width in standard text and 2 pixels in marked text fields. The maximum width is 255 pixels. A different caret width in marked text fields is only used if the &H4 attribute has been set with the [FieldEditAttr](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/fieldeditattr-property/llms-full.txt) property.

### Syntax

```vbscript
TXTextControl.CaretWidth(Caret) [= Width]
```

### Parameters

| Parameter | Description |
|---|---|
| Caret | Specifies the caret. It can be one of the following settings: |

#### Caret

| Setting | Meaning |
|---|---|
| 0 | Specifies the caret in standard text. |
| 1 | Specifies the caret in marked text fields. |

### Data Types

| Name | Data type |
|---|---|
| Caret | Integer |
| Property value | Integer |

### Limitations

Run time only.

### See Also

- [Programming Category: Control Settings](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/control-settings/llms-full.txt)

---

## Nearby

- **Previous:** [CaretOutTop Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/caretouttop-event/llms-full.txt)
- **Next:** [Change Event](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/change-event/llms-full.txt)
