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?
What does ScrollBar::SetPage do? [message #13893] Thu, 31 January 2008 15:16 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Hi!

I'm trying to implement an optimized control which would allow the scrolling of virtually huge surfaces. This is why I just can't insert a control into a larger one with two scrollbars. I'm imlementing a "virtual" scroll mechanism.

I have two scrollbars (one vertical and one horizontal). I compute the difference between the dimensions of the control and the dimension of virtual area and set them to the maximum of each scrollbar with SetTotal. Then I'm trying to set a page size:

dx = ... 
scrHor.SetTotal(dx);
scrHor.SetPage(dx / 10);


This works fine, but it seems that the last page is only scrolled to some fixed margin (somewhat like the IntegralHeight property in ColumnList). I can't get the last pixels of the area to show. But if I use SetPage(1), I can access all the ranges from the scrollbar, allowing full scrolling of the surface. But now scrolling is done in steps of 1, so clicking on the scrollbar body is useless (not useless, but very slow with increments of 1).

Am I misunderstanding the use of SetPage? How can I set a page dimension, which does not lead to some inaccessible values near the end?
 
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: Sat Apr 27 09:13:41 CEST 2024

Total time taken to generate the page: 0.05231 seconds