[Lazarus] Synchronize scrollposition of two stringgrids
jesusrmx at yahoo.com.mx
Tue Oct 16 01:54:10 CEST 2012
>I have two stringgrids with exactly the same columns, basically something like Excel autofilter.
>Does anybody have an idea how to change the scrollposition of a stringgrid depending on the scrollpos of the other?
One way would be using OnSelection event and try something like:
sg1.LeftCol := sg2.LeftCol;
sg1 will be synchronized to sg2.
That would give you row/col size granularity. For pixel granularity, without messing with grids internals, could be done using GetScrollInfo for both scrollbars on source grid and using SetScrollInfo for both scrollbars on target grid. Not tried but should work :)
Jesus Reyes A.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus