RichTextBox.SelectionTabs Property

Gets or sets the absolute tab stop positions in a RichTextBox control.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in

public int[] SelectionTabs { get; set; }
/** @property */
public int[] get_SelectionTabs ()

/** @property */
public void set_SelectionTabs (int[] value)

public function get SelectionTabs () : int[]

public function set SelectionTabs (value : int[])

Not applicable.

Property Value

An array in which each member specifies a tab offset, in pixels.

Exception typeCondition


The array has more than the maximum 32 elements.

This property enables you to obtain an array that contains the spacing for each tab in the current text selection within the RichTextBox control. You can then use this property to adjust the size of each tab within the text selection. For example, if you want to adjust the tab space within the document, you can select the entire document and obtain the list of tab spaces using the SelectionTabs property. You can then adjust them to new values and reassign them to this property.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions