Back to Devexpress

Document.DefaultTabWidth Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-document-6a0888ed.md

latest2.7 KB
Original Source

Document.DefaultTabWidth Property

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

Declaration

csharp
float DefaultTabWidth { get; set; }
vb
Property DefaultTabWidth As Single

Property Value

TypeDescription
Single

A Single object that is the default tab stop width measured in units specified by the Document.Unit property.

|

Remarks

Use the following code to set the default tab width to 5 mm.

csharp
// Set the default tab width to 5 mm.
richEditControl1.Unit = DevExpress.Office.DocumentUnit.Millimeter;
richEditControl1.Document.DefaultTabWidth = 5f;
vb
' 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 UnitValid Range
DocumentUnit.Inch0.014 - 22
DocumentUnit.Millimeter0.35 - 558
DocumentUnit.Centimeter0.035 - 55.8
DocumentUnit.Point0.98 - 1584
DocumentUnit.Document4.1 - 6600

See Also

Alignment

Position

Document Interface

Document Members

DevExpress.XtraRichEdit.API.Native Namespace