Hi taazz!
Yes, I am familiar with Tortoise. And I have a good and small patch here.
------------
I will be happy to discuss and help getting a patch into SVN that will keep the "selection cursor" item visible, if lines are scrolled.
But the current approach (adjusting top in OnPaint is wrong) At the time of any event from the scrollbox it is to late to update the top coordinate.
E.g. on Win32 ScrollBox uses the WinApi call "ScrollWindow" which acts immediately. So the scroll will be visible on the screen, before you can change the top coordinate.
On fast computers that may not be noticeable. But on slower PC that will flicker. (There is also a bug, that may currently prevent or reduce flicker, but once that gets fixed ...)
So the best way is to move the item out of the scrollbox, and Add OnClick events to all buttons, simulating correct up/down behaviour.
Otherwise you need to implement a scrollbox for which you can control when and how scrolling happens. That will be more work.
Feel free to discuss that, if/before you want to to anything on it.
Hi Martin.
I did your both 2 solution.
1. Moving the SelectButton outside the scrollbox is terrible. it requires too much hack, and I were not satisfied with the result.
2. Inheriting the TScrollBox is easier to do, easier to learn, easier to track the changes made to the code.
It is done by interceptor (Same class name as it's ancestor).
And it seem you wouldn't worry about GTK, IMHO ScrollBy would implement by all widgetset; but I don't know for sure.