cbpporter Messages: 1401 Registered: September 2007
Ultimate Contributor
mrjt wrote on Thu, 31 January 2008 17:26
The maximum position of a scrollbar (the value returned from ScrollBar::Get) is position - pagesize. For instance, for a scrollbar set as:
scroll.Set(1, 10, 99)
the maximum position will be 89, so that the last page will be displayed in full. Obviously setting pagesize to 1 will result in the maximum pos being 98.
try setting it like this:
total = virtual area size (not size - ctrl size)
pagesize = ctrl size
Thank you for the help! That worked great. I'm used to slightly different semantics when setting up the parameters for scrollbars, but I guess this is just as good, if not better.