[lazarus] Andrew... remember the scroll problem we worked on for CBT?

Tony Maro tony at maro.net
Sat Mar 22 15:59:03 EST 2003

Well I finally solved it properly.

I wrote my own (or rather hacked on the original) TMControlScrollBar and
built a TMScrollingWinControl that uses it.

What I ended up doing was just taking out about 2 lines of code from the
original (plus a little other cleanup for me)... the TControlScrollBar
refuses to separate itself from the ClientHeight no matter what.  I
needed a scrolling window control that used the scrollbar separately.

I'm sure the better way would have been to embed a TScrollbar within my
control, but every time I tried that it crashed... and the TScrollBar
seems to not be responding to messages for some reason.

In the process I also changed the range and position fields to be
longint so I can handle more transactions with it.  Now I can set the
range to be equal to the number of transactions, and set the page size
according to (clientheight div rowheight) so the thumb works right.

Tony Maro
tony at maro.net

Check out my software "CheckBook Tracker"
A GPL (free) replacement for Microsoft Money!

More information about the Lazarus mailing list