Windows Develop Bookmark and Share   
 index > Windows Forms General > How to detect if the scrollbar of a panel has been clicked when autoscroll is true
 

How to detect if the scrollbar of a panel has been clicked when autoscroll is true

Hello there.

In C# I would want to detect a user clicking on a panels scrollbar that has been generated by the autoscroll property.

The Event Panel_Scroll doesn't help here, cause it seems to fire only if the user has indeed scrolled (and not just clicked on the scrollbar).

Any help or hint would be appreciated.
Kazze101  Friday, October 02, 2009 6:04 PM
No, the Scroll event always fires.  What's special about a click that doesn't cause a scroll?

Hans Passant.
  • Marked As Answer byKazze101 Saturday, October 03, 2009 7:15 PM
  •  
nobugz  Friday, October 02, 2009 8:48 PM
No, the Scroll event always fires.  What's special about a click that doesn't cause a scroll?

Hans Passant.
  • Marked As Answer byKazze101 Saturday, October 03, 2009 7:15 PM
  •  
nobugz  Friday, October 02, 2009 8:48 PM
You are of course absolutely right.

Sorry, logical error on my side. ;)

PS: I had needed that click to set some focus.
Kazze101  Saturday, October 03, 2009 11:27 PM

You can use google to search for other answers

Custom Search

More Threads

• Problem with FromStream in PictureBox
• How to traverse controls in a windows form recursively ?
• Dual/Multi monitor â€?Window message
• how can I lose the cursor in the Textbox
• DrawImage problem
• How to change the mousepointer
• How to print to an ip address?
• Transparent pictureBox
• How to detect which TreeNode was Double Clicked?
• Tab Control Pages