--- title: Display Scroll Bars in RichTextBox Control ms.date: "03/30/2017" helpviewer_keywords: - "text boxes [Windows Forms], displaying scroll bars" - "scroll bars [Windows Forms], displaying in controls" - "RichTextBox control [Windows Forms], displaying scroll bars" ms.assetid: cdeb42e1-86e8-410c-ba46-18aec264ef5f --- # How to: Display Scroll Bars in the Windows Forms RichTextBox Control By default, the Windows Forms control displays horizontal and vertical scroll bars as necessary. There are seven possible values for the property of the control, which are described in the table below. ### To display scroll bars in a RichTextBox control 1. Set the property to `true`. No type of scroll bar, including horizontal, will display if the property is set to `false`. 2. Set the property to an appropriate value of the enumeration. |Value|Description| |-----------|-----------------| | (default)|Displays horizontal or vertical scroll bars, or both, only when text exceeds the width or length of the control.| ||Never displays any type of scroll bar.| ||Displays a horizontal scroll bar only when the text exceeds the width of the control. (For this to occur, the property must be set to `false`.)| ||Displays a vertical scroll bar only when the text exceeds the height of the control.| ||Displays a horizontal scroll bar when the property is set to `false`. The scroll bar appears dimmed when text does not exceed the width of the control.| ||Always displays a vertical scroll bar. The scroll bar appears dimmed when text does not exceed the length of the control.| ||Always displays a vertical scrollbar. Displays a horizontal scroll bar when the property is set to `false`. The scroll bars appear grayed when text does not exceed the width or length of the control.| 3. Set the property to an appropriate value. |Value|Description| |-----------|-----------------| |`false`|Text in the control is not automatically adjusted to fit the width of the control, so it will scroll to the right until a line break is reached. Use this value if you chose horizontal scroll bars or both, above.| |`true` (default)|Text in the control is automatically adjusted to fit the width of the control. The horizontal scrollbar will not appear. Use this value if you chose vertical scroll bars or none, above, to display one or more paragraphs.| ## See also - - - [RichTextBox Control](richtextbox-control-windows-forms.md) - [Controls to Use on Windows Forms](controls-to-use-on-windows-forms.md)