officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-document-6a0888ed.md
Gets or sets the default value of a tab stop width.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
float DefaultTabWidth { get; set; }
Property DefaultTabWidth As Single
| Type | Description |
|---|---|
| Single |
A Single object that is the default tab stop width measured in units specified by the Document.Unit property.
|
Use the following code to set the default tab width to 5 mm.
// Set the default tab width to 5 mm.
richEditControl1.Unit = DevExpress.Office.DocumentUnit.Millimeter;
richEditControl1.Document.DefaultTabWidth = 5f;
' Set the default tab width to 5 mm.
richEditControl1.Unit = DevExpress.Office.DocumentUnit.Millimeter
richEditControl1.Document.DefaultTabWidth = 5F
The DefaultTabWidth value is validated before assigning, and the ArgumentException is thrown if validation fails. The valid ranges are listed below. They depend on the specified measurement Document.Unit.
| Document Unit | Valid Range |
|---|---|
| DocumentUnit.Inch | 0.014 - 22 |
| DocumentUnit.Millimeter | 0.35 - 558 |
| DocumentUnit.Centimeter | 0.035 - 55.8 |
| DocumentUnit.Point | 0.98 - 1584 |
| DocumentUnit.Document | 4.1 - 6600 |
See Also