G
Guest
I have a mystery where my scrollbar behaves differently from when I use it's
slider/arrow keys compared to when I manipulate it's value with a
onMouseWheel event...
When I manipulate my scrollbar's controls (the slider or the arrow key) to
go to the bottom, Once it reaches the bottom and cannot go any further I
somehow lose 9 pixels of height, so when it refreshes my image the bottom 9
pixels are clipped off.
But if I use my MouseWheel event and wheel down to the bottom, it lines up
perfectly. The MouseWheel event just takes the Delta and modified the
scorllbar.Value property directly, not allowing it to go > max or < min.
So why does this happen?
The only properties I change are the scrollbar's Maximum and Minimum values,
where Minimum is 0 and Maximum is my image's height subtracted by the height
of the client size rectangle. Everything else left at default.
slider/arrow keys compared to when I manipulate it's value with a
onMouseWheel event...
When I manipulate my scrollbar's controls (the slider or the arrow key) to
go to the bottom, Once it reaches the bottom and cannot go any further I
somehow lose 9 pixels of height, so when it refreshes my image the bottom 9
pixels are clipped off.
But if I use my MouseWheel event and wheel down to the bottom, it lines up
perfectly. The MouseWheel event just takes the Delta and modified the
scorllbar.Value property directly, not allowing it to go > max or < min.
So why does this happen?
The only properties I change are the scrollbar's Maximum and Minimum values,
where Minimum is 0 and Maximum is my image's height subtracted by the height
of the client size rectangle. Everything else left at default.