Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » What does ScrollBar::SetPage do?
Re: What does ScrollBar::SetPage do? [message #13929 is a reply to message #13895] Fri, 01 February 2008 22:37 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13979
Registered: November 2005
Ultimate Member
mrjt wrote on Thu, 31 January 2008 10: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



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...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Frames dissapearing and Buttons not drawing
Next Topic: cannot open menu by key?
Goto Forum:
  


Current Time: Mon May 13 03:25:35 CEST 2024

Total time taken to generate the page: 0.01456 seconds