BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TScrollBar.SetPageSize bug

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Jun 16, 2006 11:59 pm    Post subject: TScrollBar.SetPageSize bug Reply with quote



I'm posting from Google because I can never get the other method(s) to
work, and I guess I don't care if not everyone can see this. I also
can't get the normal bug reporting methods to work, and don't really
care enough anyway. However, I do care about other people who may be
dealing with this same bug, so here goes:

In stdctrls.pas, inside of function:

procedure TScrollBar.SetPageSize(Value: Integer);

With BCB6, there is this line:

if (FPageSize = Value) or (Value > FMax) then exit;

Which should actually be:

if (FPageSize = Value) or (Value > (FMax - FMin)+1) then exit;

The check that Borland has only works if Min is set to 1. The default
for Min is 0, so even if you just take the defaults, Borland's check
doesn't work correctly.

If Min=0, and Max=100 (the defaults), you should be able to set
PageSize to 101 (to show that the entire scroll area is visible).

Of course if you change Min to something like -100, or 50, or whatever
else, the problem is even worse.

For me, the easiest work-around was to just set Min to 1, for any
scrollbars where I need to set PageSize this way. Too bad I already
had a bunch of code written before I found the bug, so now I have to go
rework things a bit to use the 1 based offset instead of 0.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.