0

I wanted to tick a checkbox that is on a panel but the scrollbar resets to the top of the panel (Image of this in attachments) so I have to scroll back to check it again for each checkbox. Ideally, it should just tick the box without moving the scrollbar back up. When looking this issue up, I came up on this post Don't autoscroll on button click and it said to make a custom class that inherits the panel class and override the panel class and use that. So I tried messing around with this (Image 2 and 3) but have had no success, would be really grateful if I could get some helpenter image description here enter image description here

enter image description here

Filburt
  • 17,626
  • 12
  • 64
  • 115
Qfar
  • 1
  • I’m pretty sure what you’re describing here is not normal behaviour. Are you sure there isn’t something else going on here? – Hursey Oct 15 '22 at 17:13
  • I'm not sure, I'm kind of a noobie with windows form apps so I'm unsure. This is a video of what happens https://youtu.be/dGkvXaiyK8k – Qfar Oct 15 '22 at 17:51
  • Please read [this](https://stackoverflow.com/help/minimal-reproducible-example) and update your question accordingly. Also, when the site enters the prompt "enter image description", maybe you could enter the image description. – jmcilhinney Oct 16 '22 at 01:41
  • What I was getting at when suggested this doesn't seem like normal behaviour, there will be something abnormal about what you're doing via code. This might not even be connected to the ScrollToControl method override but something else in the chain of events. Perhaps the start point is to start simplifying and logging what events are happening where in relating to the panel auto scrolling – Hursey Oct 16 '22 at 19:20

0 Answers0