This documentation is archived and is not being maintained.

RichTextBox.ScrollBars Property

Gets or sets the type of scroll bars to display in the RichTextBox control.

[Visual Basic]
Public Property ScrollBars As RichTextBoxScrollBars
[C#]
public RichTextBoxScrollBars ScrollBars {get; set;}
[C++]
public: __property RichTextBoxScrollBars get_ScrollBars();
public: __property void set_ScrollBars(RichTextBoxScrollBars);
[JScript]
public function get ScrollBars() : RichTextBoxScrollBars;
public function set ScrollBars(RichTextBoxScrollBars);

Property Value

One of the RichTextBoxScrollBars values. The default is RichTextBoxScrollBars.Both.

Exceptions

Exception Type Condition
InvalidEnumArgumentException The specified value is not defined in the RichTextBoxScrollBars enumeration.

Remarks

This property enables you to provide horizontal and vertical scroll bars to the user of the RichTextBox control to enable scrolling text within the control that is outside of the physical dimensions of the control. You can also use this property to remove scroll bars from the control to restrict scrolling the contents of the control.

Note   Horizontal scroll bars will not be shown if the WordWrap is true, regardless of the value of the ScrollBars property.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

RichTextBox Class | RichTextBox Members | System.Windows.Forms Namespace | RichTextBoxScrollBars

Show: