1

I have RichTextBox control with hidden both Scrollbars. When they are hidden I can't scroll text with mouse, I can only use PgUp and PgDown keys to move the text.

But I want to scroll with mouse when ScrollBars are disabled, is there any way I can do this?

  • Try something like this. http://stackoverflow.com/questions/479284/mouse-wheel-event-c This should helpful to you. – Arun Aug 11 '12 at 14:03

1 Answers1

1
public Form1()
{
    InitializeComponent();
    richTextBox1.MouseWheel += new MouseEventHandler(richTextBox_MouseWheel);

}

private void Form1_Load(object sender, EventArgs e)
{


}
void richTextBox_MouseWheel(object sender, MouseEventArgs e)
{
         MessageBox.Show(e.Delta.ToString());
         // use this value to scroll

        }
Arun
  • 685
  • 5
  • 20