Page 1 of 1

Bug in TScrollBar [Solved]

Posted: Wed Mar 11, 2009 12:08 pm
by Enrico Maria Giordano
The following methods of TScrollBar should modified as below:

Code: Select all

   METHOD PageUp() INLINE  ::SetPos( ::GetPos() - ::nPgStep ),;
                           If( ::bPageUp != nil, Eval( ::bPageUp ),)

   METHOD PageDown() INLINE  ::SetPos( ::GetPos() + ::nPgStep ),;
                             If( ::bPageDown != nil, Eval( ::bPageDown ),)
The reason is that they are currently different from the other similar method: they set the new position after evaluating the codeblock. With my change they act as the other methods (GoUp(), etc.).

EMG

Re: Bug in TScrollBar

Posted: Sat Mar 14, 2009 9:44 am
by Antonio Linares
Enrico,

I wonder if we will break backwards compatibility with such change.

Also, if the scrollbar position is changed from those codeblocks, then the scrollbar will not be updated.

I am not against such change. Just thinking about possible side effects...

Re: Bug in TScrollBar

Posted: Sat Mar 14, 2009 11:01 am
by Enrico Maria Giordano
Yes, but the other codeblocks are already reversed, If I'm not wrong.

EMG