Is there any simple way to track scrolling of TScrollbox content with his scrollbars ? I have several TScrollBox components (each of them has some components inside) and would like to keep them synchronous. If one of scrollboxes scrolled (vertically or horizontally) i need to scroll other scrollboxes synchronously. That is why i need to know when scrollbars positions are changed. It is strange, but Delphi's TScrollbox component doesn't have such events.
How to track scrolling of TScrollBox in Delphi
11.6k views Asked by Andrei Galatyn At
1
This can be done by adding own Events for the messages
WM_HSCROLL
andWM_HSCROLL
.The example is using a interposer class, this could also be done creating by an own component.
If you don't need two Events, you also can implement only one, beeing called in both message procedures.