lozina
Lifer
I'm struggling to figure out an annoying little scrollbar problem I am having using .NET's C#. I had to place my own scrollbar on a UserControl (because I couldn't figure out how to get them to show up automatically) and now I have to manage the scrollbars manually as well.
What I'm trying to do is pan the image I created somewhere else in the app according to scrollbar position, so I'll take my image and draw it with origin at negative values of scrollbar's values (so that only the relevant part of the image is visible in client area, rest is clipped off the top & left borders).
The vertical scrollbar seems to have problems reaching the exact bottom of my image when I drag the scrollbar thumb tab to the very bottom. It's off by about 9 pixels. I have a onMouseWheel event which modifies the scrollbar positions too and it lines up perfectly with the bottom.
I made a small reference app to demonstrate the problem I am having, try to see the thick red border on the bottom by scrolling down using the vertical scrollbar without the mouse wheel, it's not gonna happen. You only see the red bottom border if you use mouse wheel. Any idea why?
If you notice anything else I am doing wrong please let me know! 😀
What I'm trying to do is pan the image I created somewhere else in the app according to scrollbar position, so I'll take my image and draw it with origin at negative values of scrollbar's values (so that only the relevant part of the image is visible in client area, rest is clipped off the top & left borders).
The vertical scrollbar seems to have problems reaching the exact bottom of my image when I drag the scrollbar thumb tab to the very bottom. It's off by about 9 pixels. I have a onMouseWheel event which modifies the scrollbar positions too and it lines up perfectly with the bottom.
I made a small reference app to demonstrate the problem I am having, try to see the thick red border on the bottom by scrolling down using the vertical scrollbar without the mouse wheel, it's not gonna happen. You only see the red bottom border if you use mouse wheel. Any idea why?
If you notice anything else I am doing wrong please let me know! 😀