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
Hm, maybe this explanation can be easily simplified by example:
For LineEdit, vertical pagesize is number of lines that fit into the current height of page, while total is number of lines in the document...