--- title: Set Indents, Hanging Indents, and Bulleted Paragraphs with RichTextBox Control ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" - "cpp" helpviewer_keywords: - "text boxes [Windows Forms], setting indents" - ".rtf files [Windows Forms], formatting in RichTextBox control" - "examples [Windows Forms], text boxes" - "RTF files [Windows Forms], formatting in RichTextBox control" - "RichTextBox control [Windows Forms], setting indents and bullets" - "text boxes [Windows Forms], bullets" ms.assetid: abfb40e6-5642-4691-8ec1-9d9ae91688dc --- # How to: Set Indents, Hanging Indents, and Bulleted Paragraphs with the Windows Forms RichTextBox Control The Windows Forms control has numerous options for formatting the text it displays. You can format selected paragraphs as bulleted lists by setting the property. You can also use the , , and properties to set the indentation of paragraphs relative to the left and right edges of the control, and the left edge of other lines of text. ### To format a paragraph as a bulleted list 1. Set the property to `true`. ```vb RichTextBox1.SelectionBullet = True ``` ```csharp richTextBox1.SelectionBullet = true; ``` ```cpp richTextBox1->SelectionBullet = true; ``` ### To indent a paragraph 1. Set the property to an integer representing the distance in pixels between the left edge of the control and the left edge of the text. 2. Set the property to an integer representing the distance in pixels between the left edge of the first line of text in the paragraph and the left edge of subsequent lines in the same paragraph. The value of the property only applies to lines in a paragraph that have wrapped below the first line. 3. Set the property to an integer representing the distance in pixels between the right edge of the control and the right edge of the text. ```vb RichTextBox1.SelectionIndent = 8 RichTextBox1.SelectionHangingIndent = 3 RichTextBox1.SelectionRightIndent = 12 ``` ```csharp richTextBox1.SelectionIndent = 8; richTextBox1.SelectionHangingIndent = 3; richTextBox1.SelectionRightIndent = 12; ``` ```cpp richTextBox1->SelectionIndent = 8; richTextBox1->SelectionHangingIndent = 3; richTextBox1->SelectionRightIndent = 12; ``` > [!NOTE] > All these properties affect any paragraphs that contain selected text, and also the text that is typed after the current insertion point. For example, when a user selects a word within a paragraph and then adjusts the indentation, the new settings will apply to the entire paragraph that contains that word, and also to any paragraphs subsequently entered after the selected paragraph. For information about selecting text programmatically, see . ## See also - - [RichTextBox Control](richtextbox-control-windows-forms.md) - [Controls to Use on Windows Forms](controls-to-use-on-windows-forms.md)