0

I have richTextBox (dock style = fill, scrollbar = only vertical, wordwrap = false) in splitcontainer.panel1

splitcontainer.panel1.Controls.Add(richTextBox);

In case when richTextBox needs to be scrolled (when its width is bigger than width of splitcontainer.panel1).

I wish a scrollbar would appear (but in splitcontainer.panel1, not scroll bar from richTextBox).

Is it possible to handle?

LarsTech
  • 80,625
  • 14
  • 153
  • 225
santBart
  • 2,466
  • 9
  • 43
  • 66

1 Answers1

0

It certainly doesn't make sense to do that. For the sub-panel's scrollbars to even work properly, you couldn't dock-fill the RichTextBox control. Then you would have to constantly resize the RichTextBox control based on the TextChanged event, and that could get messy.

It's also not clear why you couldn't just set the ScrollBars to both:

richTextBox.ScrollBars = RichTextBoxScrollBars.Both;

It would seem to do the job you really want it to do.

LarsTech
  • 80,625
  • 14
  • 153
  • 225