Value of a HScrollbar

  • Thread starter Thread starter Eddy
  • Start date Start date
E

Eddy

Hi,

I set the maximum value of an HScrollbar on 255. When I scroll to the
maximum, the maximum value remains 246.
How is this possible??

I put some code in the Scroll event, make the HScrollbar.Value appear in a
TextBox.
Also the ScrollEventArgs.NewValue remains 246

Thanks
Eddy
 
Hi,

Eddy said:
Hi,

I set the maximum value of an HScrollbar on 255. When I scroll to the
maximum, the maximum value remains 246.
How is this possible??

I put some code in the Scroll event, make the HScrollbar.Value appear in a
TextBox.
Also the ScrollEventArgs.NewValue remains 246

from msdn.net:
The value of a scroll bar cannot reach its maximum value through user
interaction at run time. The maximum value that can be reached is equal to
the Maximum property value minus the LargeChange property value plus one.
The maximum value can only be reached programmatically.


Don't know why this is so.
HTH
greetings
 
Hi,

I set the maximum value of an HScrollbar on 255. When I scroll to the
maximum, the maximum value remains 246.
How is this possible??

I put some code in the Scroll event, make the HScrollbar.Value appear in a
TextBox.
Also the ScrollEventArgs.NewValue remains 246

Probably because you are displaying nine lines of information when
the new value is 246? The total would then be 255, your maximum.

Oz
 
Back
Top