I have one readOnly RichTextBox line with wordWrap disabled, and I add one very long line of text programmatically.
However, the horizontal scrollBar does not appear even if I set the ScrollBars to ForcedHorizontal .
ScrollBars
ForcedHorizontal
How can i fix this?
I can navigate the entire line if I use the arrow keys on the keyboard, but this only makes the situation worse.
I can reproduce this behavior with
MultiLine = false
If I change this property to True, the scroll bar will appear as expected
Try to solve this problem with
Multiline = True WordWrap = False
Change these properties to enable multi-line function as well as enable horizontal scrolling.
I ran into a vertical scrollbar issue. If the Rich text box is inside any control, such as TabPage, etc., then in this situation you need to set dock == fill for RickTextbox.
You must set the Multiline property to true. Check this text from MSDN:
Display scrollbars in a RichTextBox control Set the Multiline property to true. No type of scroll bar, including horizontal, will be displayed if the Multiline property is set to false.Set the ScrollBars property to the appropriate value of the RichTextBoxScrollBars enumeration.
Display scrollbars in a RichTextBox control Set the Multiline property to true. No type of scroll bar, including horizontal, will be displayed if the Multiline property is set to false.
Set the ScrollBars property to the appropriate value of the RichTextBoxScrollBars enumeration.