-1

I want the mouse wheel scrolls up and down within richTextBox

sharon
  • 285
  • 1
  • 3
  • 6
  • 3
    You put the cursor in the richTextBox and you move your mouse wheel up and down? – Stormenet Jun 20 '11 at 13:23
  • 1
    Make that ! instead of ? – Hans Passant Jun 20 '11 at 17:01
  • You have to *click* in the RichTextBox control first. Then you can roll the mouse wheel. Works fine every time. – Cody Gray - on strike Jun 27 '11 at 05:20
  • There is a scenario where this question makes sense and the answer is not so obvious. In my case where there was a richTextBox on the form but the vertical scrollbar shown was not for the richTextBox it was for an underlying panel. The mouse wheel scroll was having no effect because the panel with the scrollbars was not getting focus. I found the solution to this problem over here: http://stackoverflow.com/a/4766428/649497 – BruceHill Mar 17 '15 at 18:38

1 Answers1

0

You can set the focus property to the TextBox, to scroll by using the mouse wheel.

TextBox.Focus();
Bibhu
  • 4,053
  • 4
  • 33
  • 63
  • Is this a windows standard that the control must have focus to scroll with the mouse wheel? I suspect the OP expected scrolling without focus as I would also expect. –  Apr 14 '13 at 19:56