panel scrollbar reset when focus change

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
520
Programming Experience
3-5
I notice that panel doesnt keep it's scroll position when it lose focus. So i saved the position in a variable and restore the position during panel_paint. But you still this little jerk when the panel scroll to the top then back to the correct position. How do i eliminate this scroll back to the top action. I have this little counter on a statusbar thats keep ticking so it will keep taking the focus.
 
Firstly, Panels can't have focus to begin with. Secondly, I'm not sure exactly why a counter ticking on a StatusBar should take focus. I think that a more detailed description is in order.
 
Well whatever happen, whenever the text in the statusbar is updated, the panel scrollbar will scroll back to the top. Panel might not have focus but the controls inside the panel got the focus. It also jump back to top if i switch to another app and switch back to it. Try it, microsoft does say that the panel doesn't save its scroll position. I can make it scroll back to the save position ok but i can see the jump back and forth motion. I just want to know if there is a way to prevent the scroll reset to top part.
 
Last edited:
Back
Top